diff --git a/src/fonts.js b/src/fonts.js index f0e1bd4d3..eda67df33 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -4100,7 +4100,7 @@ Type1Font.prototype = { // charstring changes size - can't cache .length in loop for (var i = 0; i < charstring.length; i++) { var command = charstring[i]; - if (command.charAt) { + if (typeof command === 'string') { var cmd = map[command]; assert(cmd, 'Unknow command: ' + command);