From 5499cbc1b0a7d6bcbbf2dbd098c3dbd3e9572981 Mon Sep 17 00:00:00 2001 From: sbarman Date: Tue, 23 Aug 2011 18:17:30 -0700 Subject: [PATCH] figuring out charset --- pdf.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdf.js b/pdf.js index 410cb5e3a..ed28fa4d9 100644 --- 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');