mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +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:
parent
85838fc505
commit
a22c0eab48
5 changed files with 10 additions and 3 deletions
|
@ -268,7 +268,7 @@ describe("CFFParser", function() {
|
|||
|
||||
// CID font
|
||||
charset = parser.parseCharsets(3, 2, new CFFStrings(), true);
|
||||
expect(charset.charset).toEqual([".notdef", 8, 9]);
|
||||
expect(charset.charset).toEqual([0, 8, 9]);
|
||||
});
|
||||
|
||||
it("parses charset format 2", function() {
|
||||
|
@ -286,7 +286,7 @@ describe("CFFParser", function() {
|
|||
|
||||
// CID font
|
||||
charset = parser.parseCharsets(3, 2, new CFFStrings(), true);
|
||||
expect(charset.charset).toEqual([".notdef", 8, 9]);
|
||||
expect(charset.charset).toEqual([0, 8, 9]);
|
||||
});
|
||||
|
||||
it("parses encoding format 0", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue