Skip to content

Commit

Permalink
Do not map 0xFFFF in the cmap table
Browse files Browse the repository at this point in the history
From the TrueType font specification section about the cmap table:

> No character code should be mapped to glyph index -1 (0xFFFF), which is a special value reserved in processing to indicate the position of a glyph deleted from the glyph stream.

ref #123
  • Loading branch information
bsweeney committed Oct 16, 2023
1 parent 0deb407 commit 3bc9dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FontLib/Table/Type/cmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function _encode() {
$prevGid = $gid;
}

$segments[][] = array(0xFFFF, 0xFFFF);
$segments[][] = array(0xFFFF, null);

$startCode = array();
$endCode = array();
Expand Down

0 comments on commit 3bc9dd7

Please sign in to comment.