googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

For color fonts, make GID 1 the .null glyph #880

Closed madig closed 1 month ago

madig commented 1 month ago

Seems to be a required quirk in Windows, see https://github.com/djrrb/Bungee/issues/53.

anthrotype commented 1 month ago

it doesn't have to be the legacy .null glyph , it just needs to be empty. nanoemoji would put the space at gid1. gftools even has a fixer script that reorders the glyphs such that gid1 is an empty glyph. People can already define their public.glyphOrder as they please so I don't think ufo2ft needs to do anything.

anthrotype commented 1 month ago

also see https://github.com/googlefonts/gftools/issues/609 and https://github.com/MicrosoftDocs/typography-issues/issues/346

khaledhosny commented 1 month ago

GlyphsApp always makes space glyph id 1 (unless you really really ask it not to), may be we should do the same by default for all fonts.

anthrotype commented 1 month ago

ok.. PR?

anthrotype commented 1 month ago

@khaledhosny so this fixes it for DS+ufo projects that don't explicitly set their public.glyphOrder. But a lot of inputs to ufo2ft are actually DS+ufos that are in turn generated from glyphsLib, and the latter always sets a public.glyphOrder, and AFAIK it doesn't do anything special for 'space'. I suppose it should?

khaledhosny commented 1 month ago

Yes, I’ll do the equivalent of this change in glyphsLib shortly.