Support lsb div format
This commit is contained in:
parent
1edf8dcc4e
commit
f48ab3cfd1
6
fonts.js
6
fonts.js
@ -1485,14 +1485,18 @@ var Type1Parser = function() {
|
|||||||
// TODO Clean this code
|
// TODO Clean this code
|
||||||
if (value == 13) {
|
if (value == 13) {
|
||||||
if (charstring.length == 2) {
|
if (charstring.length == 2) {
|
||||||
|
lsb = charstring[0];
|
||||||
width = charstring[1];
|
width = charstring[1];
|
||||||
} else if (charstring.length == 4 && charstring[3] == 'div') {
|
} else if (charstring.length == 4 && charstring[3] == 'div') {
|
||||||
|
lsb = charstring[0];
|
||||||
width = charstring[1] / charstring[2];
|
width = charstring[1] / charstring[2];
|
||||||
|
} else if (charstring.length == 4 && charstring[2] == 'div') {
|
||||||
|
lsb = charstring[0] / charstring[1];
|
||||||
|
width = charstring[3];
|
||||||
} else {
|
} else {
|
||||||
error('Unsupported hsbw format: ' + charstring);
|
error('Unsupported hsbw format: ' + charstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
lsb = charstring[0];
|
|
||||||
charstring.push(lsb, 'hmoveto');
|
charstring.push(lsb, 'hmoveto');
|
||||||
charstring.splice(0, 1);
|
charstring.splice(0, 1);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user