mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Improve handling of mismatching /BaseFont and /FontName entries for non-embedded fonts (issue 7454)
This patch is the result of me going through some old issues regarding non-embedded Wingdings support. There's a few different things wrong in the referenced PDF document: - The /BaseFont and /FontName entries don't agree on the name of the fonts, with one font using `/BaseFont /Wingdings-Regular` and `/FontName /wg09np` which obviously makes no sense. To address this we'll compare the font-names against our lists of known ones and ignore /FontName entries that don't make sense iff the /BaseFont entry is a known font-name. - The non-embedded Wingdings font also set an incorrect /Encoding, in this case /MacRomanEncoding, which should have been fixed by PR 16465. However this doesn't work since the font has *bogus* font-flags, that fail to categorize the font as Symbolic. To address this we'll also compare the font-name against the list of known symbol fonts.
This commit is contained in:
parent
0023c4a511
commit
459d26edec
5 changed files with 45 additions and 20 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -490,6 +490,7 @@
|
|||
!issue11656.pdf
|
||||
!annotation-fileattachment.pdf
|
||||
!annotation-text-widget.pdf
|
||||
!issue7454.pdf
|
||||
!issue15443.pdf
|
||||
!annotation-choice-widget.pdf
|
||||
!issue10900.pdf
|
||||
|
|
BIN
test/pdfs/issue7454.pdf
Normal file
BIN
test/pdfs/issue7454.pdf
Normal file
Binary file not shown.
|
@ -5042,6 +5042,12 @@
|
|||
"link": true,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "issue7454",
|
||||
"file": "pdfs/issue7454.pdf",
|
||||
"md5": "45889bf6a9d3e2eccd01dc48668b21e5",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "bigboundingbox",
|
||||
"file": "pdfs/bigboundingbox.pdf",
|
||||
"md5": "e5c5e2cb80826d6ebf535413865270cd",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue