Skip to content

Suggestion: Use UFO format for source storage #78

@madig

Description

@madig

Description of the new feature/enhancement (with images if possible)

Currently, the font source is provided as a .glyphs file and a TTF binary with VTT code inside. This probably works fine for the designer, but both formats are not made for version control. There is another way: use the UFO format for source storage, a TTX dump for VTT code storage and put that in version control. Glyphs files and VTT binaries can then be generated.

Granted, the UFO format has its share of problems, but it is the only format explicitly made for version control. At my company, we use https://pypi.org/project/glyphsLib/ to round-trip from UFO to Glyphs and back. The UFOs are compiled with https://pypi.org/project/fontmake/, VTT hinting applied with https://github.com/daltonmaag/vttLib/.

Quick drive-by modifications to the UFOs could even be made with free tools like FontForge and TruFont.

Proposed technical implementation details (optional)

You can have a look at https://github.com/daltonmaag/ubuntu and https://gitlab.gnome.org/GNOME/cantarell-fonts/ to see what this can look like.

The workflow is roughly

  1. ufo2glyphs CascadiaCode.ufo
  2. Work on the Glyphs file
  3. glyphs2ufo CascadiaCode.glyphs (creates a Designspace file after the first time, which contains more information and is stored next to the UFO)
  4. Look through changes to UFO and commit desired changes.

Compiling the font is done with fontmake -u CascadiaCode.ufo -o ttf (or -m CascadiaCode.designspace). Note that the cubic-to-quadratic curve conversion algorithm used has an effect on the VTT hinting and can completely destroy it. I wrote a hint-transplanter for this reason, have it somewhere. Hinting is injected with python -m vttLib mergefile input.ttx output.ttf && python -m vttLib compile --ship output.ttf, where input.ttx is obtained by python -m vttLib dumpfile CascadiaCode-Regular-VTT.ttf input.ttx.

The VTT workflow is messy, but only because VTT remains a sore thumb in font production 😢

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions