From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 6 Sep 2011 15:26:48 +0000 (+0200) Subject: Do not alter the encoding if no file is going to be altered X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5e37bf7aeb82cbe227f50cfbfe964a1187546a53;p=pdf.js.git Do not alter the encoding if no file is going to be altered --- diff --git a/pdf.js b/pdf.js index 601518f..e16567c 100644 --- 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; }