diff --git a/fonts.js b/fonts.js index 9dc739796..9b306ff0e 100755 --- a/fonts.js +++ b/fonts.js @@ -1486,19 +1486,21 @@ var Type1Parser = function() { if (value == 13) { if (charstring.length == 2) { lsb = charstring[0]; + charstring.splice(0, 1); width = charstring[1]; } else if (charstring.length == 4 && charstring[3] == 'div') { lsb = charstring[0]; + charstring.splice(0, 1); width = charstring[1] / charstring[2]; } else if (charstring.length == 4 && charstring[2] == 'div') { lsb = charstring[0] / charstring[1]; + charstring.splice(0, 3); width = charstring[3]; } else { error('Unsupported hsbw format: ' + charstring); } charstring.push(lsb, 'hmoveto'); - charstring.splice(0, 1); continue; } command = charStringDictionary[value];