mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #1106 from arturadib/issue-1049
fontMatrix parsing fix, setFont() supports negative sizes
This commit is contained in:
commit
b3fb41caa9
8 changed files with 90 additions and 24 deletions
10
src/fonts.js
10
src/fonts.js
|
@ -2619,7 +2619,13 @@ var Type1Parser = function type1Parser() {
|
|||
while (str[index++] != ']')
|
||||
count++;
|
||||
|
||||
var array = str.substr(start, count).split(' ');
|
||||
str = str.substr(start, count);
|
||||
|
||||
str = str.trim();
|
||||
// Remove adjacent spaces
|
||||
str = str.replace(/\s+/g, ' ');
|
||||
|
||||
var array = str.split(' ');
|
||||
for (var i = 0, ii = array.length; i < ii; i++)
|
||||
array[i] = parseFloat(array[i] || 0);
|
||||
return array;
|
||||
|
@ -3620,7 +3626,7 @@ var Type2CFF = (function Type2CFFClosure() {
|
|||
dict['cidOperatorPresent'] = true;
|
||||
break;
|
||||
default:
|
||||
TODO('interpret top dict key');
|
||||
TODO('interpret top dict key: ' + key);
|
||||
}
|
||||
}
|
||||
return dict;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue