]> git.parisson.com Git - pdf.js.git/commitdiff
figuring out charset
authorsbarman <sbarman@L3CWZ5T.(none)>
Wed, 24 Aug 2011 01:17:30 +0000 (18:17 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Wed, 24 Aug 2011 01:17:30 +0000 (18:17 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 410cb5e3a2790252a15a4c573a5d35786d4d832a..ed28fa4d9518a080434cd75874037230ea7d72ec 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4264,7 +4264,7 @@ var PartialEvaluator = (function() {
             encodingMap[i] = GlyphsUnicode[baseGlyph];
         }
 
-        if (fontDict.has('ToUnicode')) {
+        if (fontDict.has('ToUnicode') && false) {
           encodingMap = {empty: true};
           var cmapObj = xref.fetchIfRef(fontDict.get('ToUnicode'));
           if (IsName(cmapObj)) {
@@ -4333,15 +4333,15 @@ var PartialEvaluator = (function() {
           }
         }
 
-/*       // firstChar and width are required
+        // firstChar and width are required
         // (except for 14 standard fonts)
         var firstChar = xref.fetchIfRef(fontDict.get('FirstChar'));
         var widths = xref.fetchIfRef(fontDict.get('Widths')) || [];
         for (var j = 0; j < widths.length; j++) {
           if (widths[j])
-            charset.push(encoding[j + firstChar]);
+            charset.push(encodingMap[j + firstChar]);
         }
-*/      }
+      }
 
       if (!fd) {
         var baseFontName = fontDict.get('BaseFont');