googlefonts / fontc

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Apache License 2.0
85 stars 14 forks source link

make sure masters for global/glyph/layout metrics are rounded before computing deltas #1082

Closed anthrotype closed 3 weeks ago

anthrotype commented 3 weeks ago

Fixes #1043

anthrotype commented 3 weeks ago

Seems like there should be inputs with observably different results?

yes, I mentioned Teachers-Italic.glyphs in https://github.com/googlefonts/fontc/issues/1043#issuecomment-2444388789, which contains a composite with a scaled component that gets its anchors propagated as float coordinates and produces different deltas when these get rounded beforehand. I can add a subset of that one the fontc/lib.rs integration tests. It's harder to find real world examples of masters where advance widths or kerning values or global font metrics contain floats, because designers normally use whole integer numbers. Of course I could make them up.

anthrotype commented 3 weeks ago

I made a test in a separate branch to show it failing on main: https://github.com/googlefonts/fontc/pull/1087 but I'll cherry pick it here anyway so I'll close that as soon CI fails