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

Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1050040.

With this patch the file is completely readable, but given that the font is broken enough to be rejected by OTS the rendering differs slightly from Adobe Reader.

*Note:* the PDF file is sufficiently broken that even Adobe Reader complains about the font, *and* also about another more general issue.
This commit is contained in:
Jonas Jenwald 2015-04-02 16:26:14 +02:00
parent 70b839386a
commit 0365baf5ab
4 changed files with 11 additions and 0 deletions

View file

@ -3697,6 +3697,9 @@ var Font = (function FontClosure() {
default:
warn('Unknown/unsupported post table version ' + version);
valid = false;
if (properties.defaultEncoding) {
glyphNames = properties.defaultEncoding;
}
break;
}
properties.glyphNames = glyphNames;