]> git.parisson.com Git - pdf.js.git/commitdiff
Ensure the characters between 127 and 255 are shown
authorVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 13:47:34 +0000 (15:47 +0200)
committerVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 13:47:34 +0000 (15:47 +0200)
pdf.js

diff --git a/pdf.js b/pdf.js
index 2feade07e44027fb0674d47e9e96e7839eff2a21..631496481297ae9ad7ff4bd7edf09aa78849036e 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4301,9 +4301,12 @@ var PartialEvaluator = (function() {
         for (var i = firstChar; i <= lastChar; i++) {
           var glyph = diffEncoding[i] || baseEncoding[i];
           if (glyph) {
-            glyphsMap[glyph] = encodingMap[i] = GlyphsUnicode[glyph] || i;
-            if (glyphsMap[glyph] <= 0x1f)
-              glyphsMap[glyph] = encodingMap[i] += 0xE000;
+            var index = GlyphsUnicode[glyph] || i;
+            glyphsMap[glyph] = encodingMap[i] = index;
+
+            var kCmapGlyphOffset = 0xE000;
+            if (index <= 0x1f || (index >= 127 && index <= 255))
+              glyphsMap[glyph] = encodingMap[i] += kCmapGlyphOffset;
             
           }
         }