fontmake
raw JSON → 3.11.1 verified Fri May 01 auth: no python
A Python library for compiling fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType). Version 3.11.1, requires Python >=3.9.
pip install fontmake Common errors
error ModuleNotFoundError: No module named 'fontmake' ↓
cause The library is not installed or the import path is wrong.
fix
Install with
pip install fontmake and import using from fontmake import fontmake. error AttributeError: module 'fontmake' has no attribute 'main' ↓
cause Incorrect import for CLI main function.
fix
Use
from fontmake.__main__ import main instead. error ImportError: cannot import name 'instantiator' from 'fontmake' ↓
cause The `instantiator` module was moved to `ufo2ft` in v3.9.0.
fix
Use
from ufo2ft.instantiator import .... Warnings
deprecated The `fontmake.instantiator` module was moved to `ufo2ft.instantiator` in v3.9.0. Import from `ufo2ft.instantiator` instead. ↓
fix Replace `from fontmake.instantiator import ...` with `from ufo2ft.instantiator import ...`.
breaking As of v3.11.0, `USE_MY_METRICS` component flags are no longer automatically set for variable fonts. This can cause metric mismatches if your workflow depended on the old behavior. ↓
fix If you need `USE_MY_METRICS`, set it explicitly in your source or pass `--use-my-metrics` to fontmake (if available) or handle in post-processing.
gotcha Python 3.8 support dropped in v3.11.0. The library requires Python >=3.9. ↓
fix Upgrade to Python 3.9 or later.
gotcha The `skipExportGlyphs` in DesignSpace lib overrides the UFO lib.plist key per the DS spec, but only since v3.10.1 for static TTFs. Prior versions may not respect the override correctly. ↓
fix Upgrade to >=3.10.1 or ensure the UFO lib.plist has the correct values.
Install
pip install fontmake[repacker] Imports
- fontmake wrong
import fontmakecorrectfrom fontmake import fontmake - main wrong
from fontmake import maincorrectfrom fontmake.__main__ import main - run_from_designspace
from fontmake import run_from_designspace - FontMakeError
from fontmake.errors import FontMakeError
Quickstart
from fontmake import run_from_designspace
run_from_designspace('path/to/your.designspace', output_path='output.ttf')