unstale

pypi / fonttools

fonttools

What changed in fonttools 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-26.

34 breaking10 security2 deprecations25 new APIs and options2 performance12 behavior and defaults7 tooling109 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

fonttools 4201 changes

Breaking changes 34

  • woff now requires brotli >= 1.2.1, which fixes GHSA-9v8h-qqgm-4m35.

    4.68.0release notes

  • The instancer rounds CFF2 outlines and stem hints on absolute positions rather than per relative operand.

    4.68.0release notes

  • Unclosed OS/2, BASE or STAT table blocks now raise FeatureLibError instead of looping forever.

    4.68.0release notes

  • The instancer now raises an error for conditions in unsupported formats instead of silently dropping them.

    4.68.0release notes

  • Raises TTLibError when composite glyphs exceed 65535 points.

    4.68.0release notes

  • Variable-font overrides of some public.fontInfo keys are merged with root-level font info instead of replacing it.

    4.68.0release notes

  • Bounds-checks count and offSize on read, raising TTLibError instead of allocating huge lazy lists.

    4.67.0release notes

  • Fixes format 2 compilation edge cases, rejects glyph IDs above 65535 in formats 2 and 4, splits long format 14 default UVS ranges, and round-trips empty formats 12 and 13.

    4.67.0release notes

  • Prefers the Windows English name over the Mac name.

    4.67.0release notes

  • Raises NotImplementedError for an all-off-curve cubic contour, which the point pen protocol cannot express.

    4.67.0release notes

  • Rejects in-place union with |=.

    4.67.0release notes

  • Raises ValueError instead of IndexError for a truncated path command.

    4.67.0release notes

  • Updates the variation-store binary format; VARC fonts built with earlier fontTools versions must be rebuilt.

    4.67.0release notes

  • When splitting a DesignSpace v5 document with makeNames=True, explicitly set family and style names take precedence over names computed from STAT labels in all languages; an instance with its own style name no longer gets a PostScript name made from…

    4.66.1release notes

  • Decompiling a format 4 subtable with an idRangeOffset outside glyphIndexArray now raises TTLibError instead of silently mapping to the wrong glyph or raising a bare AssertionError.

    4.66.1release notes

  • Entity resolution is disabled altogether on lxml 5.0 and later to prevent crafted DTDs from reading local files into parsed XML content.

    4.66.0release notes

  • Python 3.10 support is dropped; fontTools now requires Python 3.11 or later.

    4.66.0release notes

  • When unicodedata2 is used, version 18.0.0 is required.

    4.66.0release notes

  • The instancer rejects pinning or restricting axes referenced by VARC components.

    4.66.0release notes

  • Redundant script statements now track script and language correctly, narrow language systems, terminate the current lookup, and leave lookupflag unchanged, matching makeotf.

    4.65.0release notes

  • Conflicting duplicate inputs in axis maps are rejected instead of silently keeping the last one.

    4.64.0release notes

  • Raises TTLibError for a truncated or out-of-bounds cmap subtable header.

    4.64.0release notes

  • COLRv0 layers and COLRv1 PaintGlyph or PaintColrGlyph references to missing glyphs now produce a legible error.

    4.64.0release notes

  • An unrecoverable LookupList overflow now produces an actionable error.

    4.64.0release notes

  • Raises TTLibError instead of RecursionError when a composite-component reference cycle is encountered.

    4.64.0release notes

  • Reading a font truncated within the table directory or a table entry raises TTLibError instead of AssertionError or struct.error.

    4.64.0release notes

  • Rejects non-positive tolerances and validates curve inputs and list lengths.

    4.62.0release notes

  • Removes support for the defunct Adobe SING Glyphlet tables META, SING, GMAP, and GPKG.

    4.62.0release notes

  • Rejects non-positive tolerances and validates curve inputs and list lengths.

    4.62.0release notes

  • Raises an error when condition sets have the same name.

    4.61.0release notes

  • Support for EOL Python 3.9 has been dropped.

    4.61.0release notes

  • Raises an error when rsub has a NULL target.

    4.61.0release notes

  • Updates Unicode data to Unicode 17; installations with the unicode extra require unicodedata2 >= 17.0.0.

    4.61.0release notes

  • The v4.x series requires Python 3.6 or greater; use fonttools 3.x if Python 2 support is needed.

    4.0.0release notes

Security 10

  • Expansion of format 4 segments and format 12/13 groups is bounded; out-of-range, inverted, overlapping, and missing-glyph groups are handled without unbounded expansion.

    4.66.0release notes

  • Escapes axis names and tags in emitted designspace snippets to prevent crafted fonts from injecting markup.

    4.66.0release notes

  • The command line strips directory components from variable-font names when deriving output filenames, preventing a designspace from writing outside the output directory.

    4.65.0release notes

  • Escapes the ]]> terminator inside CDATA sections, preventing an SVG document from smuggling markup through a TTX round trip.

    4.64.0release notes

  • Rejects paths resolving outside the filesystem root, preventing malicious UFO contents.plist paths or crafted .ufoz archives from reading or writing outside the intended location.

    4.64.0release notes

  • Sanitises glyph names used as filenames when exporting EBDT/CBDT data, preventing arbitrary file writes from untrusted fonts.

    4.64.0release notes

  • Does not resolve external XML entities when lxml is used, preventing XXE file disclosure on lxml versions before 5.0.

    4.64.0release notes

  • Replaces eval() with safeEval() to prevent arbitrary code execution from crafted TTX files.

    4.62.0release notes

  • Uses only basename(vf.filename) to prevent path traversal when invoked from code; the same protection applies to the varLib command-line script.

    4.61.0release notes

  • Backports the security fix for CVE-2025-66034 while retaining Python 3.9 support, allowing downstream projects still on Python 3.9 to receive the fix.

    4.60.2release notessecurity advisory

Deprecations 2

  • This module now only re-exports enum.StrEnum and is deprecated.

    4.66.0release notes

  • The module is deprecated after its Python 2-only code was removed; it will be removed in the future.

    4.0.0release notes

New APIs and options 25

  • Adds the keyword-only resetUnspecifiedAxes pen argument for passing RESET_UNSPECIFIED_AXES while keeping addVarComponent() locations sparse.

    4.68.0release notes

  • Adds support for uppercase companion tables, extended layout, FeatureVariations 1.1, TTC 1.1/2.1 and DMAP, including in FontBuilder, merge, subset, instancer, qu2cu, removeOverlaps and scaleUpem.

    4.68.0release notes

  • Adds a module and CLI for beyond-64k tables in the final ISO Open Font Format 5th edition, with support across fontTools operations.

    4.68.0release notes

  • Adds a keyword-only argument to support decreasing design-space axis mappings.

    4.67.0release notes

  • Adds support for instancing variable COLRv1 fonts.

    4.67.0release notes

  • Allows requesting an axis's original range on VARC fonts.

    4.67.0release notes

  • A new axisCount element provides the axis count when gvar data is processed without fvar.

    4.66.0release notes

  • The new languages attribute contains all language tags in a LanguageStatement; language remains the first tag.

    4.66.0release notes

  • Static VARC fonts can omit fvar while retaining gvar or CFF2 component-internal variation data; hidden axes are addressed by index, and gvar supports compilation, decompilation, and TTX round-tripping without fvar.

    4.66.0release notes

  • The glyf table now provides an items method, making it more dict-like.

    4.65.0release notes

  • The glyf table now supports iteration, making it more dict-like.

    4.65.0release notes

  • The glyf table now provides a values method, making it more dict-like.

    4.65.0release notes

  • Adds support for legacy Apple bitmap-only font tables bhed, bdat, bloc, head variants, EBDT, and EBLC.

    4.64.0release notes

  • Adds support for the Embedded Bitmap Scaling table.

    4.64.0release notes

  • Glyph-to-group construction is accessible outside of its lookup function.

    4.64.0release notes

  • Adds semantic decompilation, TTX, and compilation support for rearrangement, contextual-substitution, ligature, and insertion subtables.

    4.64.0release notes

  • Implements splitting a single positioning lookup so GPOS lookup type 1 offset overflows can be recovered.

    4.64.0release notes

  • Adds support for TrueType Collection version 2.

    4.64.0release notes

  • Adds a shorthand for the value at the default location, such as (100 wght=900:120), equivalent to specifying the default wght value explicitly.

    4.64.0release notes

  • Adds support for the Apple Color Emoji bgcl table.

    4.63.0release notes

  • Introduces a dataclass for OpenType table schema definitions, replacing raw tuples in otData.py.

    4.63.0release notes

  • Adds support for the Incremental Font Transfer IFT table.

    4.63.0release notes

  • Adds support for the IFTX table with PatchMapFormat2.

    4.63.0release notes

  • Adds a command for comparing font files.

    4.62.0release notes

  • Adds the --remove-overlaps option.

    4.61.0release notes

Performance 2

  • Fixes exponential running time on composite glyphs that reuse the same component at several nesting levels.

    4.68.0release notes

  • Uses a reverse glyph map for O(1) membership checks in __setitem__.

    4.64.0release notes

Behavior and default changes 12

  • Accepts flattened per-region vector tuples.

    4.67.0release notes

  • Supports merging fonts that both have a MATH table.

    4.67.0release notes

  • Warns when a source or instance is dropped because it lies outside the document's own axes.

    4.67.0release notes

  • feaLib supports listing multiple language tags; following rules and lookup references are registered under every listed language, and dflt cannot be combined with other tags.

    4.66.0release notes

  • When --flavor is omitted, pyftsubset preserves the input font's WOFF or WOFF2 flavor; use --flavor=none to force uncompressed output.

    4.66.0release notes

  • When all contextual formats overflow, the ruleset is split in halves until it fits.

    4.65.0release notes

  • The variable-font instancer can now instance the BASE table.

    4.64.0release notes

  • East Asian spacing palt is kept by default during subsetting.

    4.64.0release notes

  • Cython extensions are declared free-threading compatible on Python 3.13+, so importing them on free-threaded Python no longer re-enables the GIL.

    4.63.0release notes

  • Contextual rule merging now covers single substitutions, GSUB/GPOS named lookups, ignore rules, and chained alternate substitutions.

    4.62.1release notes

  • Chained multi substitution rules with the same context are merged into one subtable instead of producing one subtable per glyph.

    4.62.0release notes

  • Adds support for --remove-overlaps with fonts that have a CFF2 table.

    4.61.0release notes

Tooling 7

  • Support for Python 3.15 is explicitly tested and declared.

    4.66.0release notes

  • TTX output shows name table strings as comments next to label IDs, matching the convention used by fvar, STAT, and trak.

    4.63.0release notes

  • Adds typing annotations for DefaultTable.

    4.62.0release notes

  • Adds typing annotations for DSIG.

    4.62.0release notes

  • Adds typing annotations for ttProgram.

    4.62.0release notes

  • Explicitly declares support for Python 3.14.

    4.61.1release notes

  • Adds typing annotations to ttFont, xmlWriter, sfnt, varLib.models and other modules.

    4.61.1release notes

Fixes and other changes 109

  • Writing a .ufoz or other non-.zip archive no longer overwrites an unrelated sibling .zip.

    4.68.0release notes

  • Escapes double quotes and backslashes when writing names from FeatureNameStatement, STATNameStatement and CVParametersNameStatement.

    4.68.0release notes

  • Arrays using more than one blend group are now preserved.

    4.68.0release notes

  • Blend values retain full precision until they are written back.

    4.68.0release notes

  • Fixes an AttributeError when updating names in fonts with a version 1.0 STAT table by falling back to the subfamily name.

    4.68.0release notes

  • scaleUpem now also scales MATH lengths that are not MathValueRecords.

    4.68.0release notes

  • Fixes operand miscounting when several blend operators precede the first stem or moveto.

    4.68.0release notes

  • CFF2 decompiling, specializing and instancing charstrings now inherit the initial vsindex from the Private DICT.

    4.68.0release notes

  • Omitted range attributes on a DesignSpace v5 axis subset are taken from the parent axis.

    4.67.0release notes

  • Corrects BCP 47 tags for some Mac and Windows language IDs.

    4.67.0release notes

  • Deleting a CFF dict attribute now actually removes it.

    4.67.0release notes

  • Reads CFF font names as Latin-1, matching how they are written.

    4.67.0release notes

  • Preserves operands when a blend has zero regions.

    4.67.0release notes

  • Normalizes mapped-axis bounds and rule conditions from their original values.

    4.67.0release notes

  • Keeps glyph metrics after probing a missing attribute.

    4.67.0release notes

  • Rejects duplicate use of a mark class in one anchor list, handles value records with all-NULL devices, and pads a short OS/2 Vendor with spaces.

    4.67.0release notes

  • Invalid BASE, UnicodeRange, name, STAT location, and OS/2 Vendor inputs now raise FeatureLibError with a source location instead of a bare Python error.

    4.67.0release notes

  • Fixes size, ssXX, and cvXX FeatureParams in FeatureVariations alternate feature tables so they compile and round-trip.

    4.67.0release notes

  • Adding rvrn shifts lookup indices inside existing FeatureVariations; null offsets are handled and substitution records stay sorted after merging.

    4.67.0release notes

  • The subsetter handles a null GDEF variation store.

    4.67.0release notes

  • The instancer CLI raises ValueError with a missing fvar table message for a static font instead of a bare KeyError.

    4.67.0release notes

  • Folds, removes, or remaps MATH VariationIndex devices when instancing, subsetting the GDEF store, or optimizing it.

    4.67.0release notes

  • Fixes tokenizing escaped parentheses in PostScript strings.

    4.67.0release notes

  • Preserves the direction of the remaining axis when decomposing a transform whose first column is zero.

    4.67.0release notes

  • Closes owned input streams when parsing fails.

    4.67.0release notes

  • Handles empty packed deltas when this setting is enabled.

    4.67.0release notes

  • Avoids a crash on a format 2.0 table with numGlyphs set to 0.

    4.67.0release notes

  • Recursive decompilation fully decodes lazily loaded ligatures, SinglePos, and PairPos arrays, preventing corruption or assertions on lazy fonts.

    4.67.0release notes

  • Passes the all-off-curve None sentinel through.

    4.67.0release notes

  • Scales per-glyph VORG origins, fixes VARC scaling for static fonts and condition variations, and avoids mutating the shared default CFF FontMatrix.

    4.67.0release notes

  • Fixes compiling a Silf table decompiled from binary.

    4.67.0release notes

  • Returns NotImplemented for unsupported types.

    4.67.0release notes

  • Fixes cubic off-curve detection across contour starts.

    4.67.0release notes

  • Computes glyph width lazily for glyf variable fonts without HVAR, making width correct before drawing.

    4.67.0release notes

  • Fixes component conditions, implicit scaleY import, reported coordinates after axis resets, and inherited coordinates when drawing CFF2 components.

    4.67.0release notes

  • Applies VVAR vertical-origin deltas to VORG and uses OpenType rounding for instanced advances and vertical origins.

    4.67.0release notes

  • Keeps a universal FeatureVariations record when pinning removes its last condition but other axes remain.

    4.67.0release notes

  • Preserves ppem Device corrections in GDEF, BASE, GPOS, and JSTF instead of asserting on them.

    4.67.0release notes

  • Respects designspace source layers and fixes --json output with SciPy.

    4.67.0release notes

  • Raises ValueError with a missing fvar table message for a static font instead of a bare KeyError.

    4.67.0release notes

  • Recomputes numRecs and numRatios when compiling.

    4.67.0release notes

  • Preserves minorVersion when copying flavor data.

    4.67.0release notes

  • Can be called more than once.

    4.67.0release notes

  • Compiling succeeds when the lowest glyph ID in a lead-byte row is 32768 or higher, instead of failing with struct.error.

    4.66.1release notes

  • The instancer no longer culls avar2 ranges for component-internal variations that can reach outside font-level ranges.

    4.66.0release notes

  • The VarStore is always recompiled when saving, preventing stale data when a font is modified in place after an earlier save.

    4.66.0release notes

  • Its type annotation and documentation now correctly specify that it holds a SourceDescriptor, not a source name.

    4.66.0release notes

  • A STAT table block missing ElidedFallbackName or ElidedFallbackNameID now raises FeatureLibError instead of UnboundLocalError.

    4.66.0release notes

  • Collinear vertical lines are treated as parallel, avoiding ZeroDivisionError.

    4.66.0release notes

  • Repeated script/language pairs within a feature block no longer replace the language system's lookups with a fresh copy of the defaults.

    4.66.0release notes

  • Preserves exact endpoints when splitting a cubic curve.

    4.66.0release notes

  • Preserves exact endpoints when splitting a quadratic curve.

    4.66.0release notes

  • Inconsistent WOFF table, metadata, or private-data lengths raise TTLibError instead of AssertionError, including under python -O.

    4.66.0release notes

  • Bundled script, script extension, block, and bidi-mirroring tables are updated to Unicode 18.0.0.

    4.66.0release notes

  • Merge reports incompatible unitsPerEm values by name and includes the input values instead of raising a bare assertion.

    4.66.0release notes

  • The instancer fixes stale VARC axis references after removing an unrelated axis.

    4.66.0release notes

  • Drawing VARC components with a negated condition (format 5) no longer raises AttributeError.

    4.66.0release notes

  • Tags containing regex metacharacters are now matched literally when scanning for an anonymous block terminator.

    4.65.0release notes

  • Offset overflows now raise OTLOffsetOverflowError instead of AttributeError, allowing another contextual format to be tried.

    4.65.0release notes

  • Glyph names are escaped in the interpolatable HTML report.

    4.65.0release notes

  • Adjusts the avar version 2 ItemVariationStore during partial instancing so remaining axes behave the same after limiting the designspace.

    4.64.0release notes

  • Preserves subtables in unsupported formats when compiling or dumping a font read from binary.

    4.64.0release notes

  • Empty Macintosh format 2 subtables now round-trip.

    4.64.0release notes

  • Reads an empty <lib> element as an empty lib instead of raising IndexError.

    4.64.0release notes

  • Fixes name-table parsing for multibyte Mac encodings.

    4.64.0release notes

  • No longer reports success when it has not promoted a lookup to Extension, so unresolvable overflows are not masked.

    4.64.0release notes

  • TrueType assembly following IDEF is indented like function definitions.

    4.64.0release notes

  • No longer crashes when instancing CFF2 fonts without a VariationStore.

    4.64.0release notes

  • Fixes Private-dict vsindex handling when instancing CFF2.

    4.64.0release notes

  • Subsetting no longer keeps constructions for glyphs added only during MATH closure.

    4.64.0release notes

  • Checks fsSelection/macStyle consistency against bhed as well as head.

    4.64.0release notes

  • Fixes a TypeError in the Cython-compiled build when tuple splines are passed.

    4.64.0release notes

  • Fixes a crash parsing an SVG path with consecutive closepath commands.

    4.64.0release notes

  • Suppresses spurious close segments caused by floating-point drift in relative path commands.

    4.64.0release notes

  • Starts a new subpath at the just-closed subpath's initial point when a drawto command follows a closepath, per SVG spec.

    4.64.0release notes

  • Uses a single head.modified timestamp across a collection save.

    4.64.0release notes

  • Subsetting collects and remaps variation indices referenced by condition tables and drops AxisIndicesList, ConditionList, and MultiVarStore when empty.

    4.64.0release notes

  • Fixes many-to-one (flat-segment) axis maps silently dropping entries via dict comprehension.

    4.63.0release notes

  • Accepts reserved bits 123-127, restoring round-trip with getUnicodeRanges and fixing a recalcUnicodeRanges crash in the subsetter.

    4.63.0release notes

  • Fixes a Cython complex-division rounding difference that could cause ±1 off-curve coordinate shifts.

    4.63.0release notes

  • Validates map CLI coordinates.

    4.62.0release notes

  • Preserves the existing name table during build.

    4.62.0release notes

  • Fixes a Python 3 TypeError when subtables share an encoding record and validates encoding-record uniqueness at compile time.

    4.62.0release notes

  • Raises a clear ColorLibError when base glyphs are missing from glyphMap instead of a confusing KeyError.

    4.62.0release notes

  • Passes location to fix glyphsLib round-tripping.

    4.62.0release notes

  • Writes 0xFFFF instead of 0 for missing nameIDs in feature parameters.

    4.62.0release notes

  • Forwards extrapolate and axisRanges, and checks location uniqueness after stripping zeros.

    4.62.0release notes

  • Fixes reading glyph outlines when glyphObject is None.

    4.62.0release notes

  • Fixes a regression with empty table lists.

    4.62.0release notes

  • Removes a duplicate final point on closePath only when it is an on-curve point.

    4.62.0release notes

  • Skips comments and processing instructions when drawing SVG paths.

    4.62.0release notes

  • Relaxes guideline validation to follow the updated spec.

    4.62.0release notes

  • Keeps return types consistent.

    4.62.0release notes

  • Fixes the --variable-fonts filter in build_many.

    4.62.0release notes

  • Fixes interpolation with non-linear avar mappings and allows use with designspace data before compilation.

    4.62.0release notes

  • Fixes axis ordering and iterative delta rounding to match fontc behavior.

    4.62.0release notes

  • Fixes node type assignment, kink detection, CFF2 vsindex parsing, glyph existence checks, and plot helpers.

    4.62.0release notes

  • Fixes a bug in avar2 full instancing.

    4.61.1release notes

  • Returns an empty Coverage instead of None when there is no coverage.

    4.61.1release notes

  • Preserves empty conditionsets when serializing designspaces to XML.

    4.61.1release notes

  • Fixes global pollution of FontBuilder setupOS2() default parameters.

    4.61.1release notes

  • BaseLangSysRecords are now sorted by tag.

    4.61.0release notes

  • Skips processing empty glyphs, supporting sparse kerning masters.

    4.61.0release notes

  • Fixes a logic bug in curveCurveIntersections.

    4.61.0release notes

  • Glyph names are now ensured to be unique.

    4.0.0release notes

  • The feature parser now correctly handles octal numbers.

    4.0.0release notes

  • The glyf table can be incomplete when dumping to XML.

    4.0.0release notes

  • Fixed an UnboundLocalError when loca or glyph tables are empty.

    4.0.0release notes

  • Fixed a KeyError when sorting masters if an axis has no on-axis masters.

    4.0.0release notes