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:
commit
ccd7ae33e4
4 changed files with 142 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue