• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H12-Aug-2021-7367

ci/H12-Aug-2021-12491

src/H12-Aug-2021-1,5971,279

tests/H12-Aug-2021-837672

.coveragercH A D12-Aug-2021873 3326

.gitignoreH A D12-Aug-2021273 2823

.gitmodulesH A D12-Aug-2021404 1312

LICENSEH A D12-Aug-20211.1 KiB2217

README.rstH A D12-Aug-20212.6 KiB5240

appveyor.ymlH A D12-Aug-20212.9 KiB8771

setup.cfgH A D12-Aug-2021286 2016

setup.pyH A D03-May-20224 KiB130106

README.rst

1|GitHub CI Status| |Appveyor CI Status| |PyPI| |Codecov|
2
3ttfautohint-py
4~~~~~~~~~~~~~~
5
6``ttfautohint-py`` is a Python wrapper for `ttfautohint
7<https://www.freetype.org/ttfautohint>`__, a free auto-hinter for TrueType fonts
8created by Werner Lemberg (`@lemzwerg <https://github/lemzwerg>`__).
9
10It uses `ctypes <https://docs.python.org/3/library/ctypes.html>`__ to load the
11``libttfautohint`` shared library and call the ``TTF_autohint`` function.
12
13Binary "wheel" packages are available for Linux (``manylinux1``), macOS and
14Windows, for both Python 2.7 and Python 3.x, with 32 and 64 bit architecture.
15They can be installed from the Python Package Index
16(`PyPI <https://pypi.python.org/pypi/ttfautohint-py>`__) using the
17`pip <https://pip.pypa.io/en/stable/>`__ installer.
18
19.. code:: sh
20
21    $ pip install ttfautohint-py
22
23The wheels include a precompiled ``libttfautohint.so`` (``*.dylib`` on
24macOS, or ``*.dll`` on Windows) shared library which has no other dependency
25apart from system libraries. The `FreeType <https://www.freetype.org>`__ and
26the `HarfBuzz <https://github.com/harfbuzz/harfbuzz>`__ libraries are compiled
27from source as static libraries and embedded in ``libttfautohint``.
28
29To compile the ``libttfautohint.dll`` from source on Windows, you need to
30install `MSYS2 <http://www.msys2.org/>`__ and the latest MinGW-w64 toolchain.
31This is because the ``ttfautohint`` build system is based on autotools and
32thus requires a Unix-like environment.
33
34A ``Makefile`` is used to build the library and its static dependencies, thus
35the GNU `make <https://www.gnu.org/software/make/>`__ executable must be on the
36``$PATH``, as this is called upon by the ``setup.py`` script.
37
38Because we build ``freetype``, ``harfbuzz`` and ``ttfautohint`` from their git
39source (checked in as git submodules), some relatively recent versions of the
40following development tools are also required: ``autoconf``, ``automake``,
41``libtool``, ``flex``, ``bison`` and ``ragel``. Please check the respective
42documentation of these libraries for more information.
43
44.. |Github CI Status| image:: https://img.shields.io/github/workflow/status/fonttools/ttfautohint-py/Wheels
45   :target: https://github.com/fonttools/ttfautohint-py/actions/workflows/wheels.yml
46.. |Appveyor CI Status| image:: https://ci.appveyor.com/api/projects/status/v3aoglkmbhtgsfao/branch/master?svg=true
47   :target: https://ci.appveyor.com/project/fonttools/ttfautohint-py/
48.. |PyPI| image:: https://img.shields.io/pypi/v/ttfautohint-py.svg
49   :target: https://pypi.python.org/pypi/ttfautohint-py
50.. |Codecov| image:: https://codecov.io/gh/fonttools/ttfautohint-py/branch/master/graph/badge.svg
51   :target: https://codecov.io/gh/fonttools/ttfautohint-py
52