Adobe Font Development Kit for OpenType (AFDKO)

raw JSON →
5.0.0 verified Fri May 01 auth: no python

AFDKO is Adobe's font development toolkit for building and manipulating OpenType font files. It provides command-line tools and a Python API for tasks such as compiling OpenType feature code (feaLib), merging fonts, and validating fonts. The current version is 5.0.0, requiring Python >=3.10. Releases follow Adobe's internal schedule; check GitHub for latest.

pip install afdko
error ModuleNotFoundError: No module named 'afdko.feaLib'
cause Trying to import feaLib from afdko instead of fontTools.
fix
Use from fontTools.feaLib import builder instead.
error AttributeError: module 'fontTools' has no attribute 'afdko'
cause Mistakenly trying to access afdko as a submodule of fontTools.
fix
AFDKO is a separate package. Import fontTools directly for font operations.
error OSError: [Errno 8] Exec format error: '/path/to/makeotf'
cause The makeotf binary is not executable or not present (common on Windows or when installing via pip without build tools).
fix
Ensure you have compiled AFDKO binaries. On Windows, consider using WSL or precompiled binaries from GitHub releases.
breaking AFDKO v3.0+ moved the Python API from afdko to fonttools. Direct imports from afdko (e.g., `from afdko.feaLib`) will fail.
fix Use `from fontTools.feaLib` instead.
deprecated The `tx` tool (used for CFF manipulation) is deprecated; use `fonttools` subcommands instead.
fix Replace `tx` calls with `fonttools varLib`, `fonttools ttx`, or similar.
breaking Python 3.10+ required. AFDKO 5.x drops support for Python <3.10.
fix Upgrade Python to 3.10 or later, or pin afdko to 4.x if needed.

Quick example using fontTools feaLib (distributed with afdko but imported from fontTools).

# AFDKO is primarily used via command-line tools.
# To compile OpenType feature code, use the makeotf command after installing.
# In Python, you typically use fontTools:

from fontTools.feaLib.builder import addOpenTypeFeaturesFromString
from fontTools.ttLib import TTFont

# Load a font, add features, save
font = TTFont('input.ttf')
features = """
    feature liga {
        sub f i by f_i;
    } liga;
"""
addOpenTypeFeaturesFromString(font, features)
font.save('output.ttf')