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 Dec 30, 2023
1 parent a45ae21 commit f7cfe59
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 @@ -202,7 +202,7 @@ function _encode() {
$prevGid = $gid;
}

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

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

0 comments on commit f7cfe59

Please sign in to comment.