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

Merge pull request #5352 from Snuffleupagus/issue-2840

Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file
This commit is contained in:
Brendan Dahl 2014-10-08 10:09:10 -07:00
commit ccd7ae33e4
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)) {