From a1d2c1c6d34ea6a7f4f66a228429e0941335b97e Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Sat, 29 Oct 2011 14:19:13 -0500 Subject: [PATCH] Fix Type1 width; TrueType special characters --- src/fonts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index 5d70bf5e4..a70d9ff4f 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -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 ?