Skip to content

fonttools/ttfautohint-py

Repository files navigation

CI Status

ttfautohint-py

ttfautohint-py is a Python wrapper for ttfautohint, a free auto-hinter for TrueType fonts created by Werner Lemberg (@lemzwerg).

As of v0.6, it runs the ttfautohint executable as a subprocess. Previous versions used ctypes to load the libttfautohint shared library, but that was hard to maintain and complicated to keep up to date with upstream ttfautohint hence we decided to switch to a simpler subprocess approach (cf. #15).

Binary "wheel" packages are available for Linux (manylinux2014), macOS and Windows, for Python 3.9+, with 32 and 64 bit architecture. They can be installed from the Python Package Index (PyPI) using the pip installer.

$ pip install ttfautohint-py

The wheels include a precompiled ttfautohint executable which has no other dependency apart from system libraries. The FreeType and the HarfBuzz libraries are compiled from source as static libraries and embedded in ttfautohint.

To compile the ttfautohint-py package from source on Windows, you need to install MSYS2 and the latest MinGW-w64 toolchain. This is because the ttfautohint build system is based on autotools and thus requires a Unix-like environment.

A Makefile is used to build the library and its static dependencies, thus the GNU make executable must be on the $PATH, as this is called upon by the setup.py script.

About

Python wrapper for ttfautohint, a free auto-hinter for TrueType fonts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •