-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Attach (recommended) or Link to PDF file here:
申请门店流程1.pdf
I have a strange document here that displays garbled text in pdf.js and Adobe, but displays correctly in Chrome. After analyzing the issue, I found that the cause is due to the font being a CID-keyed font, with the referenced CIDFontFile declared as CIDFontType2, but the actual format is OpenType instead of TrueType. This leads to pdf.js prioritizing the charset in the CFF when parsing the cmap, while ignoring the CIDToGIDMap Identity defined in the CIDFontFile. As a result, the browser fails to find the correct glyph during the rendering process.
What is the expected behavior? (add screenshot)

What went wrong? (add screenshot)

Here is some context info.
And what is said in PDF specification 5.6.3 is shown as below:

I think in this situation, font type (here is CIDFontType2) should be considered first, rather than the format.
Looking forward to your answer.Thanks