]> git.parisson.com Git - pdf.js.git/commitdiff
Only offset glyphs that can fit into the private use area
authorAdil Allawi <adil@diwan.com>
Tue, 4 Oct 2011 13:18:33 +0000 (14:18 +0100)
committerAdil Allawi <adil@diwan.com>
Tue, 4 Oct 2011 15:20:05 +0000 (16:20 +0100)
fonts.js

index a4af5fb483561c3b5553233389319c30c5344c7f..83e0771b4e7bc55ed20c5c655b3e688dac4cb273 100644 (file)
--- a/fonts.js
+++ b/fonts.js
@@ -1225,7 +1225,7 @@ var Font = (function Font() {
         for (i in encoding) {
           if (encoding.hasOwnProperty(i)) {
             var unicode = encoding[i].unicode;
-            if (unicode <= 0x1f || (unicode >= 127 && unicode <= kUnicodeCJKStart))
+            if (unicode <= 0x1f || (unicode >= 127 && unicode <= kSizeOfGlyphArea))
               encoding[i].unicode = unicode += cmapGlyphOffset;
           }
         }
@@ -1233,7 +1233,7 @@ var Font = (function Font() {
         var glyphs = [];
         for (i = 1; i < numGlyphs; i++) {
           glyphs.push({
-            unicode: i <= 0x1f || (i >= 127 && i < kUnicodeCJKStart) ?
+            unicode: i <= 0x1f || (i >= 127 && i < kSizeOfGlyphArea) ?
               i + cmapGlyphOffset : i
           });
         }