googlefonts / fontc

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

generate master names when upgrading glyphs2 to 3 #1014

Closed anthrotype closed 1 month ago

anthrotype commented 1 month ago

Fixes #264 for glyphs2 as well.

the test currently fails because we aren't generating glyphs2 master names properly (they are all set to 'Regular' which doesn't help)

anthrotype commented 1 month ago

I made two test glyphs2 sources using master names found in the wild from projects where we weren't generating them correctly, then I saved them as glyphs3 where the masters gain the explicit name attribute, and added two tests where we load both v2 and v3 copy of the same source and assert they are the same (I reused the existing assert_load_v2_matches_load_v3).

After https://github.com/googlefonts/fontc/pull/1014/commits/f90605e4f33303f9a93c27d0b2fa791d416fed21 both test now pass, which means we generate the same master names for v2 as found in the v3 source.