Support lsb div format

This commit is contained in:
Vivien Nicolas 2011-08-24 17:18:56 +02:00
parent 1edf8dcc4e
commit f48ab3cfd1

View File

@ -1485,14 +1485,18 @@ var Type1Parser = function() {
// TODO Clean this code
if (value == 13) {
if (charstring.length == 2) {
lsb = charstring[0];
width = charstring[1];
} else if (charstring.length == 4 && charstring[3] == 'div') {
lsb = charstring[0];
width = charstring[1] / charstring[2];
} else if (charstring.length == 4 && charstring[2] == 'div') {
lsb = charstring[0] / charstring[1];
width = charstring[3];
} else {
error('Unsupported hsbw format: ' + charstring);
}
lsb = charstring[0];
charstring.push(lsb, 'hmoveto');
charstring.splice(0, 1);
continue;