googlefonts / googlefonts/fontmake

match default glyph order when building TTFs from glyphs source

Open
#252 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

When generating a TTF (but for CFF-OTFs), Glyphs.app reorders the glyphs so that the first four are .notdef, null, CR and space, following an outdated recommendation in the TrueType spec (see Georg's comments in https://github.com/googlei18n/glyphsLib/issues/111).
It does this even if an explicit `glyphOrder` custom parameter is set. It doesn't do any reordering if `TrueType Keep GlyphOrder` or `DisableAllAutomaticBehaviour` are set.

If think that if fontmake wants to match Glyphs.app behaviour when building TTFs, it should do the same reordering.

Not that this can't be done in glyphsLib, because glyphsLib only produces UFOs, which in turn can be used to produce either TTFs or OTFs, and we only want this reordering to happen when building TTFs.
Neither this can be done in ufo2ft, as the latter already reads and applies the `lib["public.glyphOrder"]` whatever that is, following the UFO spec.

So it should be fontmake (one level above glyphsLib and ufo2ft) that should check when generating TTF from glyphs source file if the `TrueType Keep GlyphOrder` or `DisableAllAutomaticBehaviour` custom parameters are set; if not, it should reorder the special glyphs and pass a custom `glyphOrder` to `ufo2ft.compileTTF` function, which already accepts such an argument.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.