Skip to main content

fontforge-stubs

This package provides PEP 561 type stubs and docstrings for FontForge's Python modules:

  • fontforge
  • psMat

The stubs and docstrings were created by referencing the official FontForge Python Module documentation and -- when necessary -- the FontForge Python extension source code.

Motivation

FontForge provides powerful Python C extension modules. By nature, they do not contain typing information. Combined with inconsistent naming conventions and at times ambiguous documentation, FontForge Python scripting is unnecessarily arduous.

Perhaps you can relate to:

  • Never remembering if it's glyph.name, glyph.glyphName, or glyph.glyph_name
  • Reading the docs and still not knowing whether width is an int or a float
  • Parsing and re-parsing the documentation to figure out the structure of a feature-script-lang tuple

With type stubs, editors can provide autocompletion, and type checkers can identify errors previously only discovered when running your script with FontForge. Built-in documentation removes the need to constantly switch between your editor and external documentation -- further increasing productivity.

Installation

Install the package in your development environment:

pip install fontforge-stubs

Your editor/type-checker should automatically pick up the stubs.

Versioning and Compatibility

This project uses YYYY.MM.DD calendar versioning.

It aims to be compatible with FontForge 20230101 and later. Legacy and deprecated FontForge Python APIs are not officially supported.

Updates to the FontForge Python APIs since the latest offical release (currently 20251009) are kept in the fontforge-next branch until the next upstream release. If you are using a newer build, you may want to install from fontforge-next:

pip install git+https://github.com/chanicpanic/fontforge-stubs@fontforge-next

Contributing

If you find any issues with the type stubs, please open an issue and/or pull request.

License

This project is under the MIT License.

The stubs and docstrings in this project were closely derived from the FontForge source. In particular, fontforge.rst, psMat.rst, and python.c. See NOTICE.

Release files for fontforge-stubs 2026.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fontforge-stubs 2026.1.2
File Size Uploaded
fontforge_stubs-2026.1.2.tar.gz 60.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fontforge-stubs 2026.1.2
File Interpreter ABI Platform
fontforge_stubs-2026.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 123.2 kB

Release files / fontforge_stubs-2026.1.2.tar.gz

Download URL fontforge_stubs-2026.1.2.tar.gz
Size 60.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fac4b98d2fd0aa650d1cbe13e9c32b13ca8cce04055d2a5dda5e51355c37f3f0
BLAKE2b-256 checksum
How to use checksums
ad929171c93852072c680f8c693ee607a08fb8d05323d6d4385cf2d8ae118db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 2, 2026.

Transparency log

Release files / fontforge_stubs-2026.1.2-py3-none-any.whl

Download URL fontforge_stubs-2026.1.2-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80633b56411387012bb33fced0352c5046aa8320acca7fc88eafda06660ffc0e
BLAKE2b-256 checksum
How to use checksums
9d5c48cf5ead39bdd8ea86b0fc203291e3915a44156ec0237324ff0055ad2230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page