googlefonts / googlefonts/fontmake

add an -o auto to build a variable or static TTF depending on number of masters

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

Description

currently with -o variable, we end up needlessly building empty or no-op variable tables when the source only contains 1 master.
Adding a new -o auto would align fontmake output options with fontc, which would aid comparing the two programmatically.

see https://github.com/googlefonts/fontc/pull/971#issuecomment-2383459083

While we could change -o variable to instead build a static font when len(masters) == 1, the two variable vs static code paths are distinct enough in the fontmake pipeline to warrant a separate -o parameter. It's not the same thing to build a single master for a not-so-variable font or build it as a static font (e.g. think removing overlaps).

Contributor guide

Open the contributing guide

Research direction

Trace the existing -o variable and static output entry points, then read the linked fontc discussion for the intended comparison. Implement -o auto so one master follows the static path and multiple masters follow the variable path, while preserving the distinct behavior of the existing options; verify both cases through the project's output-option tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.