]> git.parisson.com Git - pdf.js.git/commitdiff
Fix Type1 width; TrueType special characters
authornotmasteryet <async.processingjs@yahoo.com>
Sat, 29 Oct 2011 19:19:13 +0000 (14:19 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Sat, 29 Oct 2011 19:19:13 +0000 (14:19 -0500)
src/fonts.js

index 5d70bf5e48c2298c3d9b82beba69ce3e9e44c25a..a70d9ff4f5f1952b7d5d099ae7666a0866d0bb5d 100644 (file)
@@ -1996,7 +1996,8 @@ var Font = (function Font() {
         case 'Type1':
           var glyphName = this.differences[charcode] || this.encoding[charcode];
           if (this.noUnicodeAdaptation) {
-            width = this.widths[glyphName];
+            if (!isNum(width))
+              width = this.widths[glyphName];
             unicode = GlyphsUnicode[glyphName] || charcode;
             break;
           }
@@ -2024,7 +2025,7 @@ var Font = (function Font() {
           }
           if (this.hasShortCmap) {
             var j = Encodings.MacRomanEncoding.indexOf(glyphName);
-            unicode = j >= 0 ? adaptUnicode(j) :
+            unicode = j >= 0 && !isSpecialUnicode(j) ? j :
               this.glyphNameMap[glyphName];
           } else {
             unicode = glyphName in GlyphsUnicode ?