From 5e37bf7aeb82cbe227f50cfbfe964a1187546a53 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 6 Sep 2011 17:26:48 +0200 Subject: [PATCH] Do not alter the encoding if no file is going to be altered --- pdf.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdf.js b/pdf.js index 601518f57..e16567c21 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; }