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

Support CMap-data with only strings, when parsing TrueType composite fonts (bug 920426)

In the referenced bug, the embedded fonts contain custom CMap-data that only include strings. Note how for embedded composite TrueType fonts we're using the CMap-data when building the glyph mapping, and currently we end up with a completely empty map because the code expects only CID *numbers*.
Furthermore, just fixing the glyph mapping alone isn't sufficient to fully address the bug, since we also need to consider this "special" kind of CMap-data when looking up glyph widths.
This commit is contained in:
Jonas Jenwald 2021-09-22 00:44:12 +02:00
parent db7c91e7b1
commit d3ca28bc34
4 changed files with 34 additions and 1 deletions

View file

@ -238,6 +238,7 @@
!bug900822.pdf
!bug1392647.pdf
!issue918.pdf
!bug920426.pdf
!issue1905.pdf
!issue2833.pdf
!issue2931.pdf

BIN
test/pdfs/bug920426.pdf Normal file

Binary file not shown.

View file

@ -154,6 +154,12 @@
"link": false,
"type": "eq"
},
{ "id": "bug920426",
"file": "pdfs/bug920426.pdf",
"md5": "2fd118b44513afb22509c3584388cc29",
"rounds": 1,
"type": "eq"
},
{ "id": "issue13343",
"file": "pdfs/issue13343.pdf",
"md5": "f8bf1888839e15254555092c504e1900",