fonttools 4.61.1
Tools to manipulate font files
License: MIT
Requires Python: >=3.10

|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 <LICENSE>`__.
| Among other things this means you can use it free of charge.

`User documentation <https://fonttools.readthedocs.io/en/latest/>`_ and
`developer documentation <https://fonttools.readthedocs.io/en/latest/developer.html>`_
are available at `Read the Docs <https://fonttools.readthedocs.io/>`_.

Installation
~~~~~~~~~~~~

FontTools requires `Python <http://www.python.org/download/>`__ 3.10
or later. We try to follow the same schedule of minimum Python version support as
NumPy (see `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__).

The package is listed in the Python Package Index (PyPI), so you can
install it with `pip <https://pip.pypa.io>`__:

.. code:: sh

    pip install fonttools

If you would like to contribute to its development, you can clone the
repository from GitHub, install the package in 'editable' mode and
modify the source code in place. We recommend creating a virtual
environment, using `virtualenv <https://virtualenv.pypa.io>`__ or
Python 3 `venv <https://docs.python.org/3/library/venv.html>`__ module.

.. code:: sh

    # download the source code to 'fonttools' folder
    git clone https://github.com/fonttools/fonttools.git
    cd fonttools

    # create new virtual environment called e.g. 'fonttools-venv', or anything you like
    python -m virtualenv fonttools-venv

    # source the `activate` shell script to enter the environment (Unix-like); to exit, just type `deactivate`
    . fonttools-venv/bin/activate

    # to activate the virtual environment in Windows `cmd.exe`, do
    fonttools-venv\Scripts\activate.bat

    # install in 'editable' mode
    pip install -e .

Optional Requirements
---------------------

The ``fontTools`` package currently has no (required) external dependencies
besides the modules included in the Python Standard Library.
However, a few extra dependencies are required by some of its modules, which
are needed to unlock optional features.
The ``fonttools`` PyPI distribution also supports so-called "extras", i.e. a
set of keywords that describe a group of additional dependencies, which can be
used when installing via pip, or when specifying a requirement.
For example:

.. code:: sh

    pip install fonttools[ufo,lxml,woff,unicode]

This command will install fonttools, as well as the optional dependencies that
are required to unlock the extra features named "ufo", etc.

- ``Lib/fontTools/misc/etree.py``

  The module exports a ElementTree-like API for reading/writing XML files, and
  allows to use as the backend either the built-in ``xml.etree`` module or
  `lxml <https://lxml.de>`__. The latter is preferred whenever present,
  as it is generally faster and more secure.

  *Extra:* ``lxml``

- ``Lib/fontTools/ttLib/woff2.py``

  Module to compress/decompress WOFF 2.0 web fonts; it requires:

  * `brotli <https://pypi.python.org/pypi/Brotli>`__: Python bindings of
    the Brotli compression library.

  *Extra:* ``woff``

- ``Lib/fontTools/ttLib/sfnt.py``

  To better compress WOFF 1.0 web fonts, the following module can be used
  instead of the built-in ``zlib`` library:

  * `zopfli <https://pypi.python.org/pypi/zopfli>`__: Python bindings of
    the Zopfli compression library.

  *Extra:* ``woff``

- ``Lib/fontTools/unicode.py``

  To display the Unicode character names when dumping the ``cmap`` table
  with ``ttx`` we use the ``unicodedata`` module in the Standard Library.
  The version included in there varies between different Python versions.
  To use the latest available data, you can install:

  * `unicodedata2 <https://pypi.python.org/pypi/unicodedata2>`__:
    ``unicodedata`` backport for Python 3.x updated to the latest Unicode
    version 17.0.

  *Extra:* ``unicode``

- ``Lib/fontTools/varLib/interpolatable.py``

  Module for finding wrong contour/component order between different masters.
  It requires one of the following packages in order to solve the so-called
  "minimum weight perfect matching problem in bipartite graphs", or
  the Assignment problem:

  * `scipy <https://pypi.python.org/pypi/scipy>`__: the Scientific Library
    for Python, which internally uses `NumPy <https://pypi.python.org/pypi/numpy>`__
    arrays and hence is very fast;
  * `munkres <https://pypi.python.org/pypi/munkres>`__: a pure-Python
    module that implements the Hungarian or Kuhn-Munkres algorithm. Slower than
    SciPy, but useful for minimalistic systems where adding SciPy is undesirable.

  This ensures both performance (via SciPy) and minimal footprint (via Munkres)
  are possible.

  To plot the results to a PDF or HTML format, you also need to install:

  * `pycairo <https://pypi.org/project/pycairo/>`__: Python bindings for the
    Cairo graphics library. Note that wheels are currently only available for
    Windows, for other platforms see pycairo's `installation instructions
    <https://pycairo.readthedocs.io/en/latest/getting_started.html>`__.

  *Extra:* ``interpolatable``

- ``Lib/fontTools/varLib/plot.py``

  Module for visualizing DesignSpaceDocument and resulting VariationModel.

  * `matplotlib <https://pypi.org/pypi/matplotlib>`__: 2D plotting library.

  *Extra:* ``plot``

- ``Lib/fontTools/misc/symfont.py``

  Advanced module for symbolic font statistics analysis; it requires:

  * `sympy <https://pypi.python.org/pypi/sympy>`__: the Python library for
    symbolic mathematics.

  *Extra:* ``symfont``

- ``Lib/fontTools/t1Lib.py``

  To get the file creator and type of Macintosh PostScript Type 1 fonts
  on Python 3 you need to install the following module, as the old ``MacOS``
  module is no longer included in Mac Python:

  * `xattr <https://pypi.python.org/pypi/xattr>`__: Python wrapper for
    extended filesystem attributes (macOS platform only).

  *Extra:* ``type1``

- ``Lib/fontTools/ttLib/removeOverlaps.py``

  Simplify TrueType glyphs by merging overlapping contours and components.

  * `skia-pathops <https://pypi.python.org/pypy/skia-pathops>`__: Python
    bindings for the Skia library's PathOps module, performing boolean
    operations on paths (union, intersection, etc.).

  *Extra:* ``pathops``

- ``Lib/fontTools/ufoLib``

  Package for reading and writing UFO source files; if available, it will use:

  * `fs <https://pypi.org/pypi/fs>`__: (aka ``pyfilesystem2``) filesystem abstraction layer

  for reading and writing UFOs to the local filesystem or zip files (.ufoz), instead of
  the built-in ``fontTools.misc.filesystem`` package.
  The reader and writer classes can in theory also accept any object compatible the
  ``fs.base.FS`` interface, although not all have been tested.

- ``Lib/fontTools/pens/cocoaPen.py`` and ``Lib/fontTools/pens/quartzPen.py``

  Pens for drawing glyphs with Cocoa ``NSBezierPath`` or ``CGPath`` require:

  * `PyObjC <https://pypi.python.org/pypi/pyobjc>`__: the bridge between
    Python and the Objective-C runtime (macOS platform only).

- ``Lib/fontTools/pens/qtPen.py``

  Pen for drawing glyphs with Qt's ``QPainterPath``, requires:

  * `PyQt5 <https://pypi.python.org/pypi/PyQt5>`__: Python bindings for
    the Qt cross platform UI and application toolkit.

- ``Lib/fontTools/pens/reportLabPen.py``

  Pen to drawing glyphs as PNG images, requires:

  * `reportlab <https://pypi.python.org/pypi/reportlab>`__: Python toolkit
    for generating PDFs and graphics.

- ``Lib/fontTools/pens/freetypePen.py``

  Pen to drawing glyphs with FreeType as raster images, requires:

  * `freetype-py <https://pypi.python.org/pypi/freetype-py>`__: Python binding
    for the FreeType library.
    
- ``Lib/fontTools/ttLib/tables/otBase.py``

  Use the Harfbuzz library to serialize GPOS/GSUB using ``hb_repack`` method, requires:
  
  * `uharfbuzz <https://pypi.python.org/pypi/uharfbuzz>`__: Streamlined Cython
    bindings for the harfbuzz shaping engine
    
  *Extra:* ``repacker``

How to make a new release
~~~~~~~~~~~~~~~~~~~~~~~~~

1) Update ``NEWS.rst`` with all the changes since the last release. Write a
   changelog entry for each PR, with one or two short sentences summarizing it,
   as well as links to the PR and relevant issues addressed by the PR. Do not
   put a new title, the next command will do it for you.
2) Use semantic versioning to decide whether the new release will be a 'major',
   'minor' or 'patch' release. It's usually one of the latter two, depending on
   whether new backward compatible APIs were added, or simply some bugs were fixed.
3) From inside a venv, first do ``pip install -r dev-requirements.txt``, then run
   the ``python setup.py release`` command from the tip of the ``main`` branch.
   By default this bumps the third or 'patch' digit only, unless you pass ``--major``
   or ``--minor`` to bump respectively the first or second digit.
   This bumps the package version string, extracts the changes since the latest
   version from ``NEWS.rst``, and uses that text to create an annotated git tag
   (or a signed git tag if you pass the ``--sign`` option and your git and Github
   account are configured for `signing commits <https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits>`__
   using a GPG key).
   It also commits an additional version bump which opens the main branch for
   the subsequent developmental cycle
4) Push both the tag and commit to the upstream repository, by running the command
   ``git push --follow-tags``. Note: it may push other local tags as well, be
   careful.
5) Let the CI build the wheel and source distribution packages and verify both
   get uploaded to the Python Package Index (PyPI).
6) [Optional] Go to fonttools `Github Releases <https://github.com/fonttools/fonttools/releases>`__
   page and create a new release, copy-pasting the content of the git tag
   message. This way, the release notes are nicely formatted as markdown, and
   users watching the repo will get an email notification. One day we shall
   automate that too.


Acknowledgments
~~~~~~~~~~~~~~~~

In alphabetical order:

aschmitz, Olivier Berten, Samyak Bhuta, Erik van Blokland, Petr van Blokland,
Jelle Bosma, Sascha Brawer, Tom Byrer, Antonio Cavedoni, Frédéric Coiffier,
Vincent Connare, David Corbett, Simon Cozens, Dave Crossland, Simon Daniels,
Peter Dekkers, Behdad Esfahbod, Behnam Esfahbod, Hannes Famira, Sam Fishman,
Matt Fontaine, Takaaki Fuji, Rob Hagemans, Yannis Haralambous, Greg Hitchcock,
Jeremie Hornus, Khaled Hosny, John Hudson, Denis Moyogo Jacquerye, Jack Jansen,
Tom Kacvinsky, Jens Kutilek, Antoine Leca, Werner Lemberg, Tal Leming, Liang Hai, Peter
Lofting, Cosimo Lupo, Olli Meier, Masaya Nakamura, Dave Opstad, Laurence Penney,
Roozbeh Pournader, Garret Rieger, Read Roberts, Colin Rofls, Guido van Rossum,
Just van Rossum, Andreas Seidel, Georg Seifert, Chris Simpkins, Miguel Sousa,
Adam Twardoch, Adrien Tétar, Vitaly Volkov, Paul Wise.

Copyrights
~~~~~~~~~~

| Copyright (c) 1999-2004 Just van Rossum, LettError
  (just@letterror.com)
| See `LICENSE <LICENSE>`__ for the full license.

Copyright (c) 2000 BeOpen.com. All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All
Rights Reserved.

Have fun!

.. |CI Build Status| image:: https://github.com/fonttools/fonttools/workflows/Test/badge.svg
   :target: https://github.com/fonttools/fonttools/actions?query=workflow%3ATest
.. |Coverage Status| image:: https://codecov.io/gh/fonttools/fonttools/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/fonttools/fonttools
.. |PyPI| image:: https://img.shields.io/pypi/v/fonttools.svg
   :target: https://pypi.org/project/FontTools
.. |Gitter Chat| image:: https://badges.gitter.im/fonttools-dev/Lobby.svg
   :alt: Join the chat at https://gitter.im/fonttools-dev/Lobby
   :target: https://gitter.im/fonttools-dev/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Changelog
~~~~~~~~~

4.61.1 (released 2025-12-12)
----------------------------

- [otlLib] buildCoverage: return empty Coverage instead of None (#4003, #4004).
- [instancer] bug fix in ``avar2`` full instancing (#4002).
- [designspaceLib] Preserve empty conditionsets when serializing to XML (#4001).
- [fontBu ilder] Fix FontBuilder ``setupOS2()`` default params globally polluted (#3996, #3997).
- [ttFont] Add more typing annotations to ttFont, xmlWriter, sfnt, varLib.models and others (#3952, #3826).
- Explicitly test and declare support for Python 3.14, even though we were already shipping pre-built wheels for it (#3990).

4.60.2 (released 2025-12-09)
----------------------------

- **Backport release** Same as 4.61.0 but without "Drop support for EOL Python 3.9" change to allow
  downstream projects still on Python 3.9 to avail of the security fix for CVE-2025-66034 (#3994, #3999).

4.61.0 (released 2025-11-28)
----------------------------

- [varLib.main]: **SECURITY** Only use basename(vf.filename) to prevent path traversal attacks when
  running ``fonttools varLib`` command, or code which invokes ``fonttools.varLib.main()``.
  Fixes CVE-2025-66034, see:
  https://github.com/fonttools/fonttools/security/advisories/GHSA-768j-98cg-p3fv.
- [feaLib] Sort BaseLangSysRecords by tag (#3986).
- Drop support for EOL Python 3.9 (#3982).
- [instancer] Support --remove-overlaps for fonts with CFF2 table (#3975).
- [CFF2ToCFF] Add --remove-overlaps option (#3976).
- [feaLib] Raise an error for rsub with NULL target (#3979).
- [bezierTools] Fix logic bug in curveCurveIntersections (#3963).
- [feaLib] Error when condition sets have the same name (#3958).
- [cu2qu.ufo] skip processing empty glyphs to support sparse kerning masters (#3956).
- [unicodedata] Update to Unicode 17. Require ``unicodedata2 >= 17.0.0`` when installed with 'unicode' extra.

4.60.1 (released 2025-09-29)
----------------------------

- [ufoLib] Reverted accidental method name change in ``UFOReader.getKerningGroupConversionRenameMaps``
  that broke compatibility with downstream projects like defcon (#3948, #3947, robotools/defcon#478).
- [ufoLib] Added test coverage for ``getKerningGroupConversionRenameMaps`` method (#3950).
- [subset] Don't try to subset BASE table; pass it through by default instead (#3949).
- [subset] Remove empty BaseRecord entries in MarkBasePos lookups (#3897, #3892).
- [subset] Add pruning for MarkLigPos and MarkMarkPos lookups (#3946).
- [subset] Remove duplicate features when subsetting (#3945).
- [Docs] Added documentation for the visitor module (#3944).

4.60.0 (released 2025-09-17)
----------------------------

- [pointPen] Allow ``reverseFlipped`` parameter of ``DecomposingPointPen`` to take a ``ReverseFlipped``
  enum value to control whether/how to reverse contour direction of flipped components, in addition to
  the existing True/False. This allows to set ``ReverseFlipped.ON_CURVE_FIRST`` to ensure that
  the decomposed outline starts with an on-curve point before being reversed, for better consistency
  with other segment-oriented contour transformations. The change is backward compatible, and the
  default behavior hasn't changed (#3934).
- [filterPen] Added ``ContourFilterPointPen``, base pen for buffered contour operations, and
  ``OnCurveStartPointPen`` filter to ensure contours start with an on-curve point (#3934).
- [cu2qu] Fixed difference in cython vs pure-python complex division by real number (#3930).
- [varLib.avar] Refactored and added some new sub-modules and scripts (#3926).
  * ``varLib.avar.build`` module to build avar (and a missing fvar) binaries into a possibly empty TTFont,
  * ``varLib.avar.unbuild`` module to print a .designspace snippet that would generate the same avar binary,
  * ``varLib.avar.map`` module to take TTFont and do the mapping, in user/normalized space,
  * ``varLib.avar.plan`` module moved from ``varLib.avarPlanner``.
  The bare ``fonttools varLib.avar`` script is deprecated, in favour of ``fonttools varLib.avar.build`` (or ``unbuild``).
- [interpolatable] Clarify ``linear_sum_assignment`` backend options and minimal dependency
  usage (#3927).
- [post] Speed up ``build_psNameMapping`` (#3923).
- [ufoLib] Added typing annotations to fontTools.ufoLib (#3875).

4.59.2 (released 2025-08-27)
----------------------------

- [varLib] Clear ``USE_MY_METRICS`` component flags when inconsistent across masters (#3912).
- [varLib.instancer] Avoid negative advance width/height values when instatiating HVAR/VVAR,
  (unlikely in well-behaved fonts) (#3918).
- [subset] Fix shaping behaviour when pruning empty mark sets (#3915, harfbuzz/harfbuzz#5499).
- [cu2qu] Fixed ``dot()`` product of perpendicular vectors not always returning exactly 0.0
  in all Python implementations (#3911)
- [varLib.instancer] Implemented fully-instantiating ``avar2`` fonts (#3909).
- [feaLib] Allow float values in ``VariableScalar``'s axis locations (#3906, #3907).
- [cu2qu] Handle special case in ``calc_intersect`` for degenerate cubic curves where 3 to 4
  control points are equal (#3904).

4.59.1 (released 2025-08-14)
----------------------------

- [featureVars] Update OS/2.usMaxContext if possible after addFeatureVariationsRaw (#3894).
- [vhmtx] raise TTLibError('not enough data...') when hmtx/vmtx are truncated (#3843, #3901).
- [feaLib] Combine duplicate features that have the same set of lookups regardless of the order in which those lookups are added to the feature (#3895).
- [varLib] Deprecate ``varLib.mutator`` in favor of ``varLib.instancer``. The latter
  provides equivalent full (static font) instancing in addition to partial VF instancing.
  CLI users should replace ``fonttools varLib.mutator`` with ``fonttools varLib.instancer``.
  API users should migrate to ``fontTools.varLib.instancer.instantiateVariableFont`` (#2680).


4.59.0 (released 2025-07-16)
----------------------------

- Removed hard-dependency on pyfilesystem2 (``fs`` package) from ``fonttools[ufo]`` extra.
  This is replaced by the `fontTools.misc.filesystem` package, a stdlib-only, drop-in
  replacement for the subset of the pyfilesystem2's API used by ``fontTools.ufoLib``.
  The latter should continue to work with the upstream ``fs`` (we even test with/without).
  Clients who wish to continue using ``fs`` can do so by depending on it directly instead
  of via the ``fonttools[ufo]`` extra (#3885, #3620).
- [xmlWriter] Replace illegal XML characters (e.g. control or non-characters) with "?"
  when dumping to ttx (#3868, #71).
- [varLib.hvar] Fixed vertical metrics fields copy/pasta error (#3884).
- Micro optimizations in ttLib and sstruct modules (#3878, #3879).
- [unicodedata] Add Garay script to RTL_SCRIPTS (#3882).
- [roundingPen] Remove unreliable kwarg usage. Argument names aren’t consistent among
  point pens’ ``.addComponent()`` implementations, in particular ``baseGlyphName``
  vs ``glyphName`` (#3880).

4.58.5 (released 2025-07-03)
----------------------------

- [feaLib] Don't try to combine ligature & multisub rules (#3874).
- [feaLib/ast] Use weakref proxies to avoid cycles in visitor (#3873).
- [varLib.instancer] Fixed instancing CFF2 fonts where VarData contains more than 64k items (#3858).

4.58.4 (released 2025-06-13)
----------------------------

- [feaLib] Allow for empty MarkFilter & MarkAttach sets (#3856).

4.58.3 (released 2025-06-13)
----------------------------

- [feaLib] Fixed iterable check for Python 3.13.4 and newer (#3854, #3855).

4.58.2 (released 2025-06-06)
----------------------------

- [ttLib.reorderGlyphs] Handle CFF2 when reordering glyphs (#3852)
- [subset] Copy name IDs in use before scrapping or scrambling them for webfonts (#3853)

4.58.1 (released 2025-05-28)
----------------------------

- [varLib] Make sure that fvar named instances only reuse name ID 2 or 17 if they are at the default location across all axes, to match OT spec requirement (#3831).
- [feaLib] Improve single substitution promotion to multiple/ligature substitutions, fixing a few bugs as well (#3849).
- [loggingTools] Make ``Timer._time`` a static method that doesn't take self, makes it easier to override (#3836).
- [featureVars] Use ``None`` for empty ConditionSet, which translates to a null offset in the compiled table (#3850).
- [feaLib] Raise an error on conflicting ligature substitution rules instead of silently taking the last one (#3835).
- Add typing annotations to T2CharStringPen (#3837).
- [feaLib] Add single substitutions that were promoted to multiple or ligature substitutions to ``aalt`` feature (#3847).
- [featureVars] Create a default ``LangSys`` in a ``ScriptRecord`` if missing when adding feature variations to existing GSUB later in the build (#3838).
- [symfont] Added a ``main()``.
- [cffLib.specializer] Fix rmoveto merging when blends used (#3839, #3840).
- [pyftmerge] Add support for cmap format 14 in the merge tool (#3830).
- [varLib.instancer/cff2] Fix vsindex of Private dicts when instantiating (#3828, #3232).
- Update text file read to use UTF-8 with optional BOM so it works with e.g. Windows Notepad.exe (#3824).
- [varLib] Ensure that instances only reuse name ID 2 or 17 if they are at the default location across all axes (#3831).
- [varLib] Create a dflt LangSys in a ScriptRecord when adding variations later, to fix an avoidable crash in an edge case (#3838).

4.58.0 (released 2025-05-10)
----------------------------

- Drop Python 3.8, require 3.9+ (#3819)
- [HVAR, VVAR] Prune unused regions when using a direct mapping (#3797)
- [Docs] Improvements to ufoLib documentation (#3721)
- [Docs] Improvements to varLib documentation (#3727)
- [Docs] Improvements to Pens and pen-module documentation (#3724)
- [Docs] Miscellany updates to docs (misc modules and smaller modules) (#3730)
- [subset] Close codepoints over BiDi mirror variants. (#3801)
- [feaLib] Fix serializing ChainContextPosStatement and
  ChainContextSubstStatement in some rare cases (#3788)
- [designspaceLib] Clarify user expectations for getStatNames (#2892)
- [GVAR] Add support for new `GVAR` table (#3728)
- [TSI0, TSI5] Derive number of entries to decompile from data length (#2477)
- [ttLib] Fix `AttributeError` when reporting table overflow (#3808)
- [ttLib] Apply rounding more often in getCoordinates (#3798)
- [ttLib] Ignore component bounds if empty (#3799)
- [ttLib] Change the separator for duplicate glyph names from "#" to "." (#3809)
- [feaLib] Support subtable breaks in CursivePos, MarkBasePos, MarkToLigPos and
  MarkToMarkPos lookups (#3800, #3807)
- [feaLib] If the same lookup has single substitutions and ligature
  substitutions, upgrade single substitutions to ligature substitutions with
  one input glyph (#3805)
- [feaLib] Correctly handle <NULL> in single pos lookups (#3803)
- [feaLib] Remove duplicates from class pair pos classes instead of raising an
  error (#3804)
- [feaLib] Support creating extension lookups using useExtenion lookup flag
  instead of silently ignoring it (#3811)
- [STAT] Add typing for the simpler STAT arguments (#3812)
- [otlLib.builder] Add future import for annotations (#3814)
- [cffLib] Fix reading supplement encoding (#3813)
- [voltLib] Add some missing functionality and fixes to voltLib and VoltToFea,
  making the conversion to feature files more robust. Add also `fonttools
  voltLib` command line tool to compile VOLT sources directly (doing an
  intermediate fea conversion internally) (#3818)
- [pens] Add some PointPen annotations (#3820)

4.57.0 (released 2025-04-03)
----------------------------

- [ttLib.__main__] Add `--no-recalc-timestamp` flag (#3771)
- [ttLib.__main__] Add `-b` (recalcBBoxes=False) flag (#3772)
- [cmap] Speed up glyphOrder loading from cmap (#3774)
- [ttLib.__main__] Improvements around the `-t` flag (#3776)
- [Debg] Fix parsing from XML; add roundtrip tests (#3781)
- [fealib] Support \*Base.MinMax tables (#3783, #3786)
- [config] Add OPTIMIZE_FONT_SPEED (#3784)
- [varLib.hvar] New module to add HVAR table to the font (#3780)
- [otlLib.optimize] Fix crash when the provided TTF does not contain a `GPOS` (#3794)

4.56.0 (released 2025-02-07)
----------------------------

- [varStore] Sort the input todo list with the same sorting key used for the opimizer's output (#3767).
- [otData] Fix DeviceTable's ``DeltaValue`` repeat value which caused a crash after importing from XML and then compiling a GPOS containing Device tables (#3758).
- [feaLib] Make ``FeatureLibError`` pickleable, so client can e.g. use feaLib to can compile features in parallel with multiprocessing (#3762).
- [varLib/gvar] Removed workaround for old, long-fixed macOS bug about composite glyphs with all zero deltas (#1381, #1788).
- [Docs] Updated ttLib documentation, beefed up TTFont and TTGlyphSet explanations (#3720).

4.55.8 (released 2025-01-29)
----------------------------

- [MetaTools] Fixed bug in buildUCD.py script whereby the first non-header line of some UCD text file was being skipped. This affected in particular the U+00B7 (MIDDLE DOT) entry of ScriptExtensions.txt (#3756).

4.55.7 (released 2025-01-28)
----------------------------

- Shorten the changelog included in PyPI package description to accommodate maximum length limit imposed by Azure DevOps. No actual code changes since v4.55.6 (#3754).

4.55.6 (released 2025-01-24)
----------------------------

- [glyf] Fixed regression introduced in 4.55.5 when computing bounds of nested composite glyphs  with transformed components (#3752).

4.55.5 (released 2025-01-23)
----------------------------

- [glyf] Fixed recalcBounds of transformed components with unrounded coordinates (#3750).
- [feaLib] Allow duplicate script/language statements (#3749).

4.55.4 (released 2025-01-21)
----------------------------

- [bezierTools] Fixed ``splitCubicAtT`` sometimes not returning identical start/end points as result of numerical precision (#3742, #3743).
- [feaLib/ast] Fixed docstring of ``AlternateSubstStatement`` (#3735).
- [transform] Typing fixes (#3734).

4.55.3 (released 2024-12-10)
----------------------------

- [Docs] fill out ttLib table section [#3716]
- [feaLib] More efficient inline format 4 lookups [#3726]

4.55.2 (released 2024-12-05)
----------------------------

- [Docs] update Sphinx config (#3712)
- [designspaceLib] Allow axisOrdering to be set to zero (#3715)
- [feaLib] Don’t modify variable anchors in place (#3717)

4.55.1 (released 2024-12-02)
----------------------------

- [ttGlyphSet] Support VARC CFF2 fonts (#3683)
- [DecomposedTransform] Document and implement always skewY == 0 (#3697)
- [varLib] "Fix" cython iup issue? (#3704)
- Cython minor refactor (#3705)


4.55.0 (released 2024-11-14)
----------------------------

- [cffLib.specializer] Adjust stack use calculation (#3689)
- [varLib] Lets not add mac names if the rest of name doesn't have them (#3688)
- [ttLib.reorderGlyphs] Update CFF table charstrings and charset (#3682)
- [cffLib.specializer] Add cmdline to specialize a CFF2 font (#3675, #3679)
- [CFF2] Lift uint16 VariationStore.length limitation (#3674)
- [subset] consider variation selectors subsetting cmap14 (#3672)
- [varLib.interpolatable] Support CFF2 fonts (#3670)
- Set isfinal to true in XML parser for proper resource cleanup (#3669)
- [removeOverlaps] Fix CFF CharString width (#3659)
- [glyf] Add optimizeSize option (#3657)
- Python 3.13 support (#3656)
- [TupleVariation] Optimize for loading speed, not size (#3650, #3653)


4.54.1 (released 2024-09-24)
----------------------------

- [unicodedata] Update to Unicode 16
- [subset] Escape ``\\`` in doc string

4.54.0 (released 2024-09-23)
----------------------------

- [Docs] Small docs cleanups by @n8willis (#3611)
- [Docs] cleanup code blocks by @n8willis (#3627)
- [Docs] fix Sphinx builds by @n8willis (#3625)
- [merge] Minor fixes to documentation for merge by @drj11 (#3588)
- [subset] Small tweaks to pyftsubset documentation by @RoelN (#3633)
- [Tests] Do not require fonttools command to be available by @behdad (#3612)
- [Tests] subset_test: add failing test to reproduce issue #3616 by @anthrotype (#3622)
- [ttLib] NameRecordVisitor: include whole sequence of character variants' UI labels, not just the first by @anthrotype (#3617)
- [varLib.avar] Reconstruct mappings from binary by @behdad (#3598)
- [varLib.instancer] Fix visual artefacts with partial L2 instancing by @Hoolean (#3635)
- [varLib.interpolatable] Support discrete axes in .designspace by @behdad (#3599)
- [varLib.models] By default, assume OpenType-like normalized space by @behdad (#3601)

4.53.1 (released 2024-07-05)
----------------------------

- [feaLib] Improve the sharing of inline chained lookups (#3559)
- [otlLib] Correct the calculation of OS/2.usMaxContext with reversed chaining contextual single substitutions (#3569)
- [misc.visitor] Visitors search the inheritance chain of objects they are visiting (#3581)

4.53.0 (released 2024-05-31)
----------------------------

- [ttLib.removeOverlaps] Support CFF table to aid in downconverting CFF2 fonts (#3528)
- [avar] Fix crash when accessing not-yet-existing attribute (#3550)
- [docs] Add buildMathTable to otlLib.builder documentation (#3540)
- [feaLib] Allow UTF-8 with BOM when reading features (#3495)
- [SVGPathPen] Revert rounding coordinates to two decimal places by default (#3543)
- [varLib.instancer] Refix output filename decision-making  (#3545, #3544, #3548)

4.52.4 (released 2024-05-27)
----------------------------

- [varLib.cff] Restore and deprecate convertCFFtoCFF2 that was removed in 4.52.0
  release as it is used by downstream projects (#3535).

4.52.3 (released 2024-05-27)
----------------------------

- Fixed a small syntax error in the reStructuredText-formatted NEWS.rst file
  which caused the upload to PyPI to fail for 4.52.2. No other code changes.

4.52.2 (released 2024-05-27)
----------------------------

- [varLib.interpolatable] Ensure that scipy/numpy output is JSON-serializable
  (#3522, #3526).
- [housekeeping] Regenerate table lists, to fix pyinstaller packaging of the new
  ``VARC`` table (#3531, #3529).
- [cffLib] Make CFFToCFF2 and CFF2ToCFF more robust (#3521, #3525).

4.52.1 (released 2024-05-24)
----------------------------

- Fixed a small syntax error in the reStructuredText-formatted NEWS.rst file
  which caused the upload to PyPI to fail for 4.52.0. No other code changes.

4.52.0 (released 2024-05-24)
----------------------------

- Added support for the new ``VARC`` (Variable Composite) table that is being
  proposed to OpenType spec (#3395). For more info:
  https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md
- [ttLib.__main__] Fixed decompiling all tables (90fed08).
- [feaLib] Don't reference the same lookup index multiple times within the same
  feature record, it is only applied once anyway (#3520).
- [cffLib] Moved methods to desubroutinize, remove hints and unused subroutines
  from subset module to cffLib (#3517).
- [varLib.instancer] Added support for partial-instancing CFF2 tables! Also, added
  method to down-convert from CFF2 to CFF 1.0, and CLI entry points to convert
  CFF<->CFF2 (#3506).
- [subset] Prune unused user name IDs even with --name-IDs='*' (#3410).
- [ttx] use GNU-style getopt to intermix options and positional arguments (#3509).
- [feaLib.variableScalar] Fixed ``value_at_location()`` method (#3491)
- [psCharStrings] Shorten output of ``encodeFloat`` (#3492).
- [bezierTools] Fix infinite-recursion in ``calcCubicArcLength`` (#3502).
- [avar2] Implement ``avar2`` support in ``TTFont.getGlyphSet()`` (#3473).

4.51.0 (released 2024-04-05)
----------------------------

- [ttLib] Optimization on loading aux fields (#3464).
- [ttFont] Add reorderGlyphs (#3468).

4.50.0 (released 2024-03-15)
----------------------------

- [pens] Added decomposing filter pens that draw components as regular contours (#3460).
- [instancer] Drop explicit no-op axes from TupleVariations (#3457).
- [cu2qu/ufo] Return set of modified glyph names from fonts_to_quadratic (#3456).

4.49.0 (released 2024-02-15)
----------------------------

- [otlLib] Add API for building ``MATH`` table (#3446)

4.48.1 (released 2024-02-06)
----------------------------

- Fixed uploading wheels to PyPI, no code changes since v4.48.0.

4.48.0 (released 2024-02-06)
----------------------------

- [varLib] Do not log when there are no OTL tables to be merged.
- [setup.py] Do not restrict lxml<5 any more, tests pass just fine with lxml>=5.
- [feaLib] Remove glyph and class names length restrictions in FEA (#3424).
- [roundingPens] Added ``transformRoundFunc`` parameter to the rounding pens to allow
  for custom rounding of the components' transforms (#3426).
- [feaLib] Keep declaration order of ligature components within a ligature set, instead
  of sorting by glyph name (#3429).
- [feaLib] Fixed ordering of alternates in ``aalt`` lookups, following the declaration
  order of feature references within the ``aalt`` feature block (#3430).
- [varLib.instancer] Fixed a bug in the instancer's IUP optimization (#3432).
- [sbix] Support sbix glyphs with new graphicType "flip" (#3433).
- [svgPathPen] Added ``--glyphs`` option to dump the SVG paths for the named glyphs
  in the font (0572f78).
- [designspaceLib] Added "description" attribute to ``<mappings>`` and ``<mapping>``
  elements, and allow multiple ``<mappings>`` elements to group ``<mapping>`` elements
  that are logically related (#3435, #3437).
- [otlLib] Correctly choose the most compact GSUB contextual lookup format (#3439).

4.47.2 (released 2024-01-11)
----------------------------

Minor release to fix uploading wheels to PyPI.

4.47.1 (released 2024-01-11)
----------------------------

- [merge] Improve help message and add standard command line options (#3408)
- [otlLib] Pass ``ttFont`` to ``name.addName`` in ``buildStatTable`` (#3406)
- [featureVars] Re-use ``FeatureVariationRecord``'s when possible (#3413)

4.47.0 (released 2023-12-18)
----------------------------

- [varLib.models] New API for VariationModel: ``getMasterScalars`` and
  ``interpolateFromValuesAndScalars``.
- [varLib.interpolatable] Various bugfixes and rendering improvements. In particular,
  add a Summary page in the front, and an Index and Table-of-Contents in the back.
  Change the page size to Letter.
- [Docs/designspaceLib] Defined a new ``public.fontInfo`` lib key, not used anywhere yet (#3358).

4.46.0 (released 2023-12-02)
----------------------------

- [featureVars] Allow to register the same set of substitution rules to multiple features.
  The ``addFeatureVariations`` function can now take a list of featureTags; similarly, the
  lib key 'com.github.fonttools.varLib.featureVarsFeatureTag' can now take a
  comma-separateed string of feature tags (e.g. "salt,ss01") instead of a single tag (#3360).
- [featureVars] Don't overwrite GSUB FeatureVariations, but append new records to it
  for features which are not already there. But raise ``VarLibError`` if the feature tag
  already has feature variations associated with it (#3363).
- [varLib] Added ``addGSUBFeatureVariations`` function to add GSUB Feature Variations
  to an existing variable font from rules defined in a DesignSpace document (#3362).
- [varLib.interpolatable] Various bugfixes and rendering improvements. In particular,
  a new test for "underweight" glyphs. The new test reports quite a few false-positives
  though. Please send feedback.

4.45.1 (released 2023-11-23)
----------------------------

- [varLib.interpolatable] Various bugfixes and improvements, better reporting, reduced
  false positives.
- [ttGlyphSet] Added option to not recalculate glyf bounds (#3348).

4.45.0 (released 2023-11-20)
----------------------------

- [varLib.interpolatable] Vastly improved algorithms. Also available now is ``--pdf``
  and ``--html`` options to generate a PDF or HTML report of the interpolation issues.
  The PDF/HTML report showcases the problematic masters, the interpolated broken
  glyph, as well as the proposed fixed version.

4.44.3 (released 2023-11-15)
----------------------------

- [subset] Only prune codepage ranges for OS/2.version >= 1, ignore otherwise (#3334).
- [instancer] Ensure hhea vertical metrics stay in sync with OS/2 ones after instancing
  MVAR table containing 'hasc', 'hdsc' or 'hlgp' tags (#3297).

4.44.2 (released 2023-11-14)
----------------------------

- [glyf] Have ``Glyph.recalcBounds`` skip empty components (base glyph with no contours)
  when computing the bounding box of composite glyphs. This simply restores the existing
  behavior before some changes were introduced in fonttools 4.44.0 (#3333).

4.44.1 (released 2023-11-14)
----------------------------

- [feaLib] Ensure variable mark anchors are deep-copied while building since they
  get modified in-place and later reused (#3330).
- [OS/2|subset] Added method to ``recalcCodePageRanges`` to OS/2 table class; added
  ``--prune-codepage-ranges`` to `fonttools subset` command (#3328, #2607).

4.44.0 (released 2023-11-03)
----------------------------

- [instancer] Recalc OS/2 AvgCharWidth after instancing if default changes (#3317).
- [otlLib] Make ClassDefBuilder class order match varLib.merger's, i.e. large
  classes first, then glyph lexicographic order (#3321, #3324).
- [instancer] Allow not specifying any of min:default:max values and let be filled
  up with fvar's values (#3322, #3323).
- [instancer] When running --update-name-table ignore axes that have no STAT axis
  values (#3318, #3319).
- [Debg] When dumping to ttx, write the embedded JSON as multi-line string with
  indentation (92cbfee0d).
- [varStore] Handle > 65535 items per encoding by splitting VarData subtable (#3310).
- [subset] Handle null-offsets in MarkLigPos subtables.
- [subset] Keep East Asian spacing fatures vhal, halt, chws, vchw by default (#3305).
- [instancer.solver] Fixed case where axisDef < lower and upper < axisMax (#3304).
- [glyf] Speed up compilation, mostly around ``recalcBounds`` (#3301).
- [varLib.interpolatable] Speed it up when working on variable fonts, plus various
  micro-optimizations (#3300).
- Require unicodedata2 >= 15.1.0 when installed with 'unicode' extra, contains UCD 15.1.

4.43.1 (released 2023-10-06)
----------------------------

- [EBDT] Fixed TypeError exception in `_reverseBytes` method triggered when dumping
  some bitmap fonts with `ttx -z bitwise` option (#3162).
- [v/hhea] Fixed UnboundLocalError exception in ``recalc`` method when no vmtx or hmtx
  tables are present (#3290).
- [bezierTools] Fixed incorrectly typed cython local variable leading to TypeError when
  calling ``calcQuadraticArcLength`` (#3288).
- [feaLib/otlLib] Better error message when building Coverage table with missing glyph (#3286).

4.43.0 (released 2023-09-29)
----------------------------

- [subset] Set up lxml ``XMLParser(resolve_entities=False)`` when parsing OT-SVG documents
  to prevent XML External Entity (XXE) attacks (9f61271dc):
  https://codeql.github.com/codeql-query-help/python/py-xxe/
- [varLib.iup] Added workaround for a Cython bug in ``iup_delta_optimize`` that was
  leading to IUP tolerance being incorrectly initialised, resulting in sub-optimal deltas
  (60126435d, cython/cython#5732).
- [varLib] Added new command-line entry point ``fonttools varLib.avar`` to add an
  ``avar`` table to an existing VF from axes mappings in a .designspace file (0a3360e52).
- [instancer] Fixed bug whereby no longer used variation regions were not correctly pruned
  after VarData optimization (#3268).
- Added support for Python 3.12 (#3283).

4.42.1 (released 2023-08-20)
----------------------------

- [t1Lib] Fixed several Type 1