Skip to content

Commit 412500c

Browse files
authored
Merge pull request #19996 from calixteman/bug1961423_bis
Fix a printing issue on Mac (bug 1961423)
2 parents 35b604b + 14f0e88 commit 412500c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/cff_parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,13 +1770,13 @@ class CFFCompiler {
17701770
// In a CID font, the charset is a mapping of CIDs not SIDs so just
17711771
// create an identity mapping.
17721772
// nLeft: Glyphs left in range (excluding first) (see the CFF specs).
1773-
// Having a wrong value for nLeft induces a print issue on MacOS (see
1773+
// The first CID must be 1 in order to avoid a print issue on mac (see
17741774
// https://bugzilla.mozilla.org/1961423).
17751775
const nLeft = numGlyphsLessNotDef - 1;
17761776
out = new Uint8Array([
17771777
2, // format
17781778
0, // first CID upper byte
1779-
0, // first CID lower byte
1779+
1, // first CID lower byte
17801780
(nLeft >> 8) & 0xff,
17811781
nLeft & 0xff,
17821782
]);

test/unit/cff_parser_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ describe("CFFCompiler", function () {
479479
expect(out).toEqual([
480480
2, // format
481481
0, // cid (high)
482-
0, // cid (low)
482+
1, // cid (low)
483483
0, // nLeft (high)
484484
numGlyphs - 2, // nLeft (low)
485485
]);

0 commit comments

Comments
 (0)