1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file

This commit is contained in:
Jonas Jenwald 2014-09-27 13:14:25 +02:00
parent 744c8e8d7e
commit df2a4afd36
4 changed files with 142 additions and 0 deletions

View file

@ -2475,6 +2475,12 @@ var Font = (function FontClosure() {
for (var code in GlyphMapForStandardFonts) {
map[+code] = GlyphMapForStandardFonts[code];
}
var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap;
if (!isIdentityUnicode) {
this.toUnicode.forEach(function(charCode, unicodeCharCode) {
map[+charCode] = unicodeCharCode;
});
}
this.toFontChar = map;
this.toUnicode = new ToUnicodeMap(map);
} else if (/Symbol/i.test(fontName)) {