Python package for reading and writing TrueType, OpenType, and related font formats, including the TTX XML conversion tool.
Overview
fontTools is a Python library for manipulating font files. The project includes TTX, which converts TrueType and OpenType fonts to and from an XML format also called TTX.
Supported formats include TrueType, OpenType, AFM, and partial Type 1 and Mac-specific formats. The package requires Python 3.11 or later and installs from PyPI via pip.
Optional extras unlock features such as UFO read/write, WOFF compression, Unicode name dumps, plotting, variable-font tools, and HarfBuzz repacking. The core package has no required third-party dependencies beyond the Python standard library.
Documentation for users and developers is published on Read the Docs, covering modules for pens, varLib, ttLib tables, and subsetting workflows.
Key features
- TrueType and OpenType editing
- TTX XML import and export
- Variable font tooling
- UFO source read and write
- WOFF and WOFF2 support extras
- Subset and merge utilities
- Optional HarfBuzz repacker
- pip installable PyPI package
Use cases
- Automated font build pipelines
- Inspecting font tables as XML
- Variable font design workflows
- Batch subsetting webfonts