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

Improve the handling of errors, in PartialEvaluator.loadFont, occuring in PartialEvaluator.preEvaluateFont (issue 12823)

Currently any errors thrown in `preEvaluateFont`, which is a *synchronous* method, will not be handled at all in the `loadFont` method and we were thus failing to return an `ErrorFont`-instance as intended here.

Also, add an *explicit* check in `PartialEvaluator.preEvaluateFont` to ensure that Type0-fonts always have a *valid* dictionary.
This commit is contained in:
Jonas Jenwald 2021-01-07 11:25:09 +01:00
parent ed3758f84d
commit 78c32c2697
4 changed files with 17 additions and 1 deletions

View file

@ -70,6 +70,7 @@
!issue8570.pdf
!issue8697.pdf
!issue8702.pdf
!issue12823.pdf
!issue8707.pdf
!issue8798r.pdf
!issue8823.pdf

BIN
test/pdfs/issue12823.pdf Normal file

Binary file not shown.

View file

@ -1163,6 +1163,12 @@
"link": false,
"type": "eq"
},
{ "id": "issue12823",
"file": "pdfs/issue12823.pdf",
"md5": "8391c63006ccc4b41c95de5e8c38deeb",
"rounds": 1,
"type": "eq"
},
{ "id": "bug1050040",
"file": "pdfs/bug1050040.pdf",
"md5": "9076b29bd157e2646b457f29a4472a07",