1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

The first glyph in CFF CIDFonts must be named 0 instead of ".notdef"

Fixes #11718 in which the `ff` ligature glyph is at index zero in a CFF font. Beacuse this is a CIDFont, glyph names are CIDs, which are integers. Thus the string `".notdef"` is not correct. The rest of the charset data is already parsed correctly as integers when the boolean argument `cid` is true.
This commit is contained in:
Jani Pehkonen 2020-03-24 15:33:43 +02:00
parent 85838fc505
commit a22c0eab48
5 changed files with 10 additions and 3 deletions

View file

@ -803,7 +803,7 @@ var CFFParser = (function CFFParserClosure() {
var bytes = this.bytes;
var start = pos;
var format = bytes[pos++];
var charset = [".notdef"];
const charset = [cid ? 0 : ".notdef"];
var id, count, i;
// subtract 1 for the .notdef glyph