Making Type 2 font sanitazable (#631)
This commit is contained in:
parent
a1507893e8
commit
1444a7e794
8
fonts.js
8
fonts.js
@ -2271,7 +2271,7 @@ CFF.prototype = {
|
|||||||
'return': 11,
|
'return': 11,
|
||||||
'sub': [12, 11],
|
'sub': [12, 11],
|
||||||
'div': [12, 12],
|
'div': [12, 12],
|
||||||
'pop': [1, 12, 18],
|
'pop': [139, 12, 18],
|
||||||
'drop' : [12, 18],
|
'drop' : [12, 18],
|
||||||
'endchar': 14,
|
'endchar': 14,
|
||||||
'rmoveto': 21,
|
'rmoveto': 21,
|
||||||
@ -2287,9 +2287,11 @@ CFF.prototype = {
|
|||||||
var cmd = map[command];
|
var cmd = map[command];
|
||||||
assert(cmd, 'Unknow command: ' + command);
|
assert(cmd, 'Unknow command: ' + command);
|
||||||
|
|
||||||
if (isArray(cmd))
|
if (isArray(cmd)) {
|
||||||
charstring.splice(i++, 1, cmd[0], cmd[1]);
|
charstring.splice(i++, 1, cmd[0], cmd[1]);
|
||||||
else
|
if (cmd.length > 2)
|
||||||
|
charstring.splice(++i, 0, cmd[2]);
|
||||||
|
} else if (cmd !== null)
|
||||||
charstring[i] = cmd;
|
charstring[i] = cmd;
|
||||||
} else {
|
} else {
|
||||||
// Type1 charstring use a division for number above 32000
|
// Type1 charstring use a division for number above 32000
|
||||||
|
Loading…
Reference in New Issue
Block a user