Skip to main content

Python wrapper for Adobe's PostScript autohinter

Project description

Test and Build Codecov PyPI Language grade: C/C++ Language grade: Python Total alerts

PSAutoHint

A standalone version of AFDKO’s autohinter.

Building and running

This repository currently consists of a core autohinter written in C, a Python C extension providing an interface to it, and helper Python code.

To build the C extension:

python setup.py build

To install the C extension and the helper scripts globally:

pip install -r requirements.txt .

Alternatively to install them for the current user:

pip install -r requirements.txt --user .

The autohinter can be used by running:

psautohint

To build just the autohintexe binary:

python setup.py build_exe

Testing

We have a test suite that can be run with:

pytest

Debugging

For standard debugging, build with:

python setup.py build --debug

It is also possible to build a debug version with AddressSanitizer ("ASan") support (currently for Mac OS X only) with:

python setup.py build --asan
pip install .

Once it is installed, you can use the util/launch-asan.sh shell script to launch a Python process that invokes the ASan libraries needed for debugging. Attach Xcode the launched process, then execute code in the process that triggers memory usage problems and wait for ASan to do its magic.

NOTE: be sure to build and install psautohint as described above; using other techniques such as python setup.py install will cause a re-build without ASan and debug support, which won't work.

Project details


Release history Release notifications | RSS feed

This version

2.4.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psautohint-2.4.0.tar.gz (185.6 kB view hashes)

Uploaded Source

Built Distributions

psautohint-2.4.0-cp310-cp310-win_amd64.whl (135.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

psautohint-2.4.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (144.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

psautohint-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl (132.4 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

psautohint-2.4.0-cp310-cp310-macosx_10_9_universal2.whl (201.9 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

psautohint-2.4.0-cp39-cp39-win_amd64.whl (135.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

psautohint-2.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (144.6 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

psautohint-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl (132.4 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

psautohint-2.4.0-cp39-cp39-macosx_10_9_universal2.whl (201.9 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

psautohint-2.4.0-cp38-cp38-win_amd64.whl (135.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

psautohint-2.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (144.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

psautohint-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl (132.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

psautohint-2.4.0-cp38-cp38-macosx_10_9_universal2.whl (201.9 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

psautohint-2.4.0-cp37-cp37m-win_amd64.whl (135.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

psautohint-2.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (144.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

psautohint-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl (132.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page