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

Improve glyph mapping for non-embedded composite standard fonts with a /CIDToGIDMap (issue 11915)

*Please note:* All of this feels very handwavy, but at least it passes all tests locally. Hopefully we have enough tests for this part of the font code.

For non-embedded composite standard fonts with an "incomplete" /CIDToGIDMap, we'll now fallback to an *explicitly defined* /ToUnicode map even when that one happens to be an /Identity-H or /Identity-V map.

The `Font.fallbackToSystemFont` method is unfortunately getting more and more special-cases, however that might be unavoidable given all the weird non-embedded fonts found in the wild :-(
This commit is contained in:
Jonas Jenwald 2021-09-15 11:06:25 +02:00
parent 7fb653b19a
commit a11343e9af
4 changed files with 22 additions and 0 deletions

View file

@ -355,6 +355,7 @@
!tensor-allflags-withfunction.pdf
!issue10084_reduced.pdf
!issue4246.pdf
!issue11915.pdf
!js-authors.pdf
!issue4461.pdf
!issue4573.pdf

BIN
test/pdfs/issue11915.pdf Normal file

Binary file not shown.

View file

@ -2365,6 +2365,12 @@
"link": false,
"type": "text"
},
{ "id": "issue11915",
"file": "pdfs/issue11915.pdf",
"md5": "c4f890b4a5b6f21653421856335181d5",
"rounds": 1,
"type": "eq"
},
{ "id": "issue10614",
"file": "pdfs/issue10614.pdf",
"md5": "c41da60ce9af100cb78e1c2a6ba18232",