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

Fix bad truetype loca tables.

Some fonts have loca tables that aren't sorted or use 0 as an offset to
signal a missing glyph. This fixes the bad loca tables by sorting them
and then rewriting the loca table and potentially re-ordering the glyf
table to match.

Fixes #11131 and bug 1650302.
This commit is contained in:
Brendan Dahl 2020-08-07 13:04:53 -07:00
parent 8c162f57f7
commit f6dff81223
5 changed files with 53 additions and 27 deletions

View file

@ -63,6 +63,7 @@
!issue8372.pdf
!issue8424.pdf
!issue8480.pdf
!bug1650302_reduced.pdf
!issue8570.pdf
!issue8697.pdf
!issue8702.pdf
@ -121,6 +122,7 @@
!bug1132849.pdf
!issue6894.pdf
!issue5804.pdf
!issue11131_reduced.pdf
!Pages-tree-refs.pdf
!ShowText-ShadingPattern.pdf
!complex_ttf_font.pdf

Binary file not shown.

Binary file not shown.

View file

@ -3268,6 +3268,12 @@
"link": true,
"type": "eq"
},
{ "id": "issue11131_reduced",
"file": "pdfs/issue11131_reduced.pdf",
"md5": "004b7e7d2b133a8dc4fe64aaf3dc9533",
"rounds": 1,
"type": "eq"
},
{ "id": "issue818",
"file": "pdfs/issue818.pdf",
"md5": "dd2f8a5bd65164ad74da2b45a6ca90cc",
@ -3365,6 +3371,12 @@
"link": false,
"type": "load"
},
{ "id": "bug1650302_reduced",
"file": "pdfs/bug1650302_reduced.pdf",
"md5": "d918c9ec936486e8b6656e10dd909014",
"rounds": 1,
"type": "eq"
},
{ "id": "blendmode",
"file": "pdfs/blendmode.pdf",
"md5": "5a86e7e9333e93c58abc3f382e1e6ea2",