Always fallback to system font on font failure.
The font in the PDF is marked as a CIDFontType0, but the font file is actually a true type font. To fully address this issue we should really peek into the font file and try to determine what it is. However, this is the first case of this issue, so I think this solution is acceptable for now.
This commit is contained in:
parent
8a4be24645
commit
5f67a6a237
@ -621,9 +621,6 @@ var Font = (function FontClosure() {
|
||||
throw new FormatError(`Font ${type} is not supported`);
|
||||
}
|
||||
} catch (e) {
|
||||
if (!(e instanceof FormatError)) {
|
||||
throw e;
|
||||
}
|
||||
warn(e);
|
||||
this.fallbackToSystemFont();
|
||||
return;
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -88,6 +88,7 @@
|
||||
!bug1068432.pdf
|
||||
!bug1146106.pdf
|
||||
!bug1252420.pdf
|
||||
!issue9949.pdf
|
||||
!bug1308536.pdf
|
||||
!bug1337429.pdf
|
||||
!issue5564_reduced.pdf
|
||||
|
4639
test/pdfs/issue9949.pdf
Normal file
4639
test/pdfs/issue9949.pdf
Normal file
File diff suppressed because one or more lines are too long
@ -578,6 +578,12 @@
|
||||
"annotations": true,
|
||||
"about": "PDF with annotations, some of which have the Hidden flag set."
|
||||
},
|
||||
{ "id": "issue9949",
|
||||
"file": "pdfs/issue9949.pdf",
|
||||
"md5": "55d24d7fc71b849818ea91d3b9eaf302",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4665-text",
|
||||
"file": "pdfs/issue4665.pdf",
|
||||
"md5": "0de1308432819c101881df7ca4424575",
|
||||
|
Loading…
Reference in New Issue
Block a user