]> git.parisson.com Git - pdf.js.git/commitdiff
Do not alter the encoding if no file is going to be altered
authorVivien Nicolas <21@vingtetun.org>
Tue, 6 Sep 2011 15:26:48 +0000 (17:26 +0200)
committerVivien Nicolas <21@vingtetun.org>
Tue, 6 Sep 2011 15:26:48 +0000 (17:26 +0200)
pdf.js

diff --git a/pdf.js b/pdf.js
index 601518f579c95e9c920657c1df8dca2cd0ef4617..e16567c21462976b28a0cf93df3160e0e2cc855d 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4304,6 +4304,9 @@ var PartialEvaluator = (function() {
             var index = GlyphsUnicode[glyph] || i;
             glyphsMap[glyph] = encodingMap[i] = index;
 
+            if (!fontFile)
+              continue;
+
             if (index <= 0x1f || (index >= 127 && index <= 255))
               glyphsMap[glyph] = encodingMap[i] += kCmapGlyphOffset;
           }