diff --git a/src/core/fonts.js b/src/core/fonts.js index 9f4b4efd2..93c88263b 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -4227,11 +4227,12 @@ var Font = (function FontClosure() { } } if (!found && properties.glyphNames) { - // Try to map using the post table. There are currently no known - // pdfs that this fixes. + // Try to map using the post table. var glyphId = properties.glyphNames.indexOf(glyphName); if (glyphId > 0 && hasGlyph(glyphId, -1, -1)) { charCodeToGlyphId[charCode] = glyphId; + } else { + charCodeToGlyphId[charCode] = 0; // notdef } } } diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index eea4212a7..65961a4e8 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -137,4 +137,5 @@ !issue5909.pdf !issue6010_1.pdf !issue6010_2.pdf +!issue6068.pdf !issue6081.pdf diff --git a/test/pdfs/issue6068.pdf b/test/pdfs/issue6068.pdf new file mode 100644 index 000000000..242d9a964 Binary files /dev/null and b/test/pdfs/issue6068.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index c01d42717..82327225e 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1151,6 +1151,13 @@ "rounds": 1, "type": "eq" }, + { "id": "issue6068", + "file": "pdfs/issue6068.pdf", + "md5": "bbcedb94776b40352729c16940a5b2bd", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "tamreview", "file": "pdfs/TAMReview.pdf", "md5": "8039aba56790d3597d2bc8c794a51301",