-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Glyphs kern values can be floats, but we were parsing them as integers. This also uncovered something else fishy: our integer parsing logic in glyps-reader/ascii-plist-derive will happy parse something like "1.321" as an integer, by parsing to a float and casting. I think this is incorrect? I think it is reasonable to go the other way (to accept an integer value as a float) and it _might_ be reasonable to accept an integer value with no fractional component as a float, but I definitely don't think we should parse a float with a fractional value as an integer; it hides bugs like this.
- Loading branch information
Showing
3 changed files
with
53 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
.formatVersion = 3; | ||
familyName = KernFloats; | ||
fontMaster = ( | ||
{ | ||
id = m01; | ||
} | ||
); | ||
glyphs = ( | ||
{ | ||
glyphname = space; | ||
layers = ( | ||
{ | ||
layerId = m01; | ||
width = 200; | ||
} | ||
); | ||
} | ||
); | ||
unitsPerEm = 1000; | ||
kerning = { | ||
"m01" = { | ||
space = { | ||
space = 4.2001; | ||
}; | ||
}; | ||
}; | ||
} |