diff --git a/src/core/fonts.js b/src/core/fonts.js index eff8181c7..677e29386 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2486,6 +2486,13 @@ var Font = (function FontClosure() { } this.toFontChar[charCode] = fontChar; } + for (charCode in properties.differences) { + fontChar = GlyphsUnicode[properties.differences[charCode]]; + if (!fontChar) { + continue; + } + this.toFontChar[charCode] = fontChar; + } } else if (/Dingbats/i.test(fontName)) { var dingbats = Encodings.ZapfDingbatsEncoding; for (charCode in dingbats) { diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 94c9c87a9..8edc0bd67 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -62,6 +62,7 @@ !issue4668.pdf !issue5039.pdf !issue5070.pdf +!issue5238.pdf !issue5244.pdf !gradientfill.pdf !bug903856.pdf diff --git a/test/pdfs/issue5238.pdf b/test/pdfs/issue5238.pdf new file mode 100644 index 000000000..a4ac44b22 Binary files /dev/null and b/test/pdfs/issue5238.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 00db5533f..65c145d65 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -478,6 +478,13 @@ "lastPage": 1, "type": "eq" }, + { "id": "issue5238", + "file": "pdfs/issue5238.pdf", + "md5": "6ddecda00893be1793de20a70c83a3c2", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "txt2pdf", "file": "pdfs/txt2pdf.pdf", "md5": "02cefa0f5e8d96313bb05163b2f88c8c",