| single |
|CI Build Status| |Coverage Status| |PyPI| |Gitter Chat|
What is this?
~~~~~~~~~~~~~
| fontTools is a library for manipulating fonts, written in Python. The
project includes the TTX tool, that can convert TrueType and OpenType
fonts to and from an XML text format, which is also called TTX. It
supports TrueType, OpenType, AFM and to an extent Type 1 and some
Mac-specific formats. The project has an `MIT open-source
license `__.
| Among other things this means you can use it free of charge.
[User documentation] and
[developer documentation]
are available at [Read the Docs].
Installation
~~~~~~~~~~~~
FontTools requires [Python] 3.10
or later. We try to follow the same schedule of minimum Python version
support as
NumPy (see [NEP 29]).
The package is listed in the Python Package Index (PyPI), so you can
install it with [pip]:
Changelog
~~~~~~~~~
4.64.0 (released 2026-08-31)
----------------------------
- [feaLib] Fix name-table parsing for multibyte Mac encodings (#1196,
#4092).
- [ttProgram] Also indent TrueType assembly following ``IDEF[]``, like
function
definitions (#4093).
- [subset] Keep East Asian spacing palt by default (#4094).
- [subset] Bug fix for MATH table in which constructions for glyphs that
are only
added during MATH closure were kept (#4096).
- [ufoLib] Make glyph-to-group construction accessible outside of lookup
function
(#4102).
- [glyf] Use reverse glyph map for O(1) __setitem__ membership (#4103).
- [ttLib] Fix ``fixLookupOverFlows()`` reporting success when it had not
promoted
any lookup to Extension, masking unresolvable overflows.
- [ttLib] Add support for TrueType Collection version 2 (#4100).
- [ttLib] Pin a single head.modified timestamp across ``TTCollection.save``
(#4111).
- [ttLib] Give an actionable error when LookupList overflow is
unrecoverable (#4109).
- [ttLib] Add support for the AAT bitmap tables bhed, bdat, bloc,
variants of head, EBDT, EBLC used in legacy Apple bitmap-only fonts
(#4115).
- [ttLib] Check ``OS/2`` fsSelection/macStyle consistency against bhed as
well
as head (#4118, #4119).
- [misc.roundTools] Add types and documentation (#4123).
- [varLib.instancer] Instance the BASE table (#4137).
- [varLib.instancer] Fix Private-dict vsindex handling in instantiateCFF2
(#4129, #4132).
- [varLib.instancer] Fix crash instancing CFF2 fonts without a
VariationStore
(#4130, #4131).
- [sfnt] Raise TTLibError instead of AssertionError or ``struct.error``
when reading a font truncated within the table directory or a table entry
(#4147, #4149).
- [misc.xmlWriter] Escape the ``]]>`` terminator inside CDATA sections, so
an SVG
document containing it can no longer smuggle markup past a TTX round trip
(#4139).
- [varLib.instancer] Implement avar2 partial-instancing: the avar version 2
ItemVariationStore is adjusted so that remaining axes behave the same
after
limiting the designspace (#4045).
- [feaLib] Add shorthand for the value at the default location in a
variable
scalar: ``(100 wght=900:120) means (wght=400:100 wght=900:120)`` when the
wght default is 400 (#4024).
- [cmap] Raise TTLibError for a truncated or out-of-bounds cmap subtable
header (#4151).
- [designspaceLib] Reject conflicting duplicate inputs in axis maps instead
of
silently keeping the last one (#4153).
- [designspaceLib] Read an empty `` element as an empty lib instead of
raising IndexError`` (#4142, #4144).
- [colorLib] Raise a legible error when a COLRv0 layer, or a COLRv1
PaintGlyph or
PaintColrGlyph, references a glyph missing from the glyphMap, instead of
failing
obscurely later (#2629, #4141).
- [cmap] Don't drop subtables in unsupported formats when compiling or
dumping a
font read from binary (#4136).
- [ttLib] Implement splitSinglePos so GPOS lookup type 1 offset overflows
can
|