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

Only choose a (3, 1) cmap table for TrueType fonts that have an encoding specified (issue 6410)

For (1, 0) cmaps, we have two different codepaths depending on whether the font has/hasn't got an encoding. But with (3, 1) cmaps we don't have a good fallback when the encoding is missing, hence this patch changes `readCmapTable` to only choose a (3, 1) cmap table if the font is non-symbolic *and* an encoding exists. Without this, we'll not be able to successfully create a working glyph map for some TrueType fonts with (3, 1) cmap tables.

Fixes 6410.
This commit is contained in:
Jonas Jenwald 2015-09-06 17:16:31 +02:00
parent 3daae40425
commit 29a1cdb6a6
4 changed files with 14 additions and 5 deletions

View file

@ -98,6 +98,7 @@
!issue5747.pdf
!issue6099.pdf
!issue6336.pdf
!issue6410.pdf
!gradientfill.pdf
!bug903856.pdf
!bug850854.pdf

BIN
test/pdfs/issue6410.pdf Normal file

Binary file not shown.

View file

@ -1086,6 +1086,13 @@
"link": true,
"type": "eq"
},
{ "id": "issue6410",
"file": "pdfs/issue6410.pdf",
"md5": "fd5c5898d5b9754bb546724b7d31bf59",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "issue6413",
"file": "pdfs/issue6413.pdf",
"md5": "08926ac7a46e27a4abbb31256b3a7b29",