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:
parent
70b839386a
commit
0365baf5ab
@ -3697,6 +3697,9 @@ var Font = (function FontClosure() {
|
|||||||
default:
|
default:
|
||||||
warn('Unknown/unsupported post table version ' + version);
|
warn('Unknown/unsupported post table version ' + version);
|
||||||
valid = false;
|
valid = false;
|
||||||
|
if (properties.defaultEncoding) {
|
||||||
|
glyphNames = properties.defaultEncoding;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
properties.glyphNames = glyphNames;
|
properties.glyphNames = glyphNames;
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -12,6 +12,7 @@
|
|||||||
!arial_unicode_ab_cidfont.pdf
|
!arial_unicode_ab_cidfont.pdf
|
||||||
!arial_unicode_en_cidfont.pdf
|
!arial_unicode_en_cidfont.pdf
|
||||||
!asciihexdecode.pdf
|
!asciihexdecode.pdf
|
||||||
|
!bug1050040.pdf
|
||||||
!canvas.pdf
|
!canvas.pdf
|
||||||
!complex_ttf_font.pdf
|
!complex_ttf_font.pdf
|
||||||
!extgstate.pdf
|
!extgstate.pdf
|
||||||
|
BIN
test/pdfs/bug1050040.pdf
Normal file
BIN
test/pdfs/bug1050040.pdf
Normal file
Binary file not shown.
@ -579,6 +579,13 @@
|
|||||||
"link": false,
|
"link": false,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "bug1050040",
|
||||||
|
"file": "pdfs/bug1050040.pdf",
|
||||||
|
"md5": "9076b29bd157e2646b457f29a4472a07",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "hudsonsurvey",
|
{ "id": "hudsonsurvey",
|
||||||
"file": "pdfs/hudsonsurvey.pdf",
|
"file": "pdfs/hudsonsurvey.pdf",
|
||||||
"md5": "bf0e6576a7b6c2fe7485bce1b78e006f",
|
"md5": "bf0e6576a7b6c2fe7485bce1b78e006f",
|
||||||
|
Loading…
Reference in New Issue
Block a user