]> git.parisson.com Git - pdf.js.git/commitdiff
Properly build toFontChar
authornotmasteryet <async.processingjs@yahoo.com>
Mon, 20 Feb 2012 20:26:30 +0000 (14:26 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Mon, 20 Feb 2012 20:26:30 +0000 (14:26 -0600)
src/fonts.js

index e67286d8116d6e2e1adbd8c98a64bf556575fcfc..01e7a7c9fa9004cbb8c46afaf82dd8404f05302c 100644 (file)
@@ -2147,8 +2147,9 @@ var Font = (function FontClosure() {
       for (var i = 0, ii = toUnicode.length; i < ii; i++) {
         var unicode = toUnicode[i];
         var fontCharCode = typeof unicode === 'object' ? unusedUnicode++ :
-           unicode;
-        result.push(fontCharCode);
+          unicode;
+        if (typeof unicode !== 'undefined')
+          result[i] = fontCharCode;
       }
       return result;
     },