Browse Source

Fix Type1 width; TrueType special characters

notmasteryet 14 years ago
parent
commit
a1d2c1c6d3
  1. 3
      src/fonts.js

3
src/fonts.js

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

Loading…
Cancel
Save