Type stubs for FontForge's Python modules
Project description
fontforge-stubs
This package provides PEP 561 type stubs and docstrings for FontForge's Python modules:
fontforgepsMat
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, orglyph.glyph_name - Reading the docs and still not knowing whether
widthis anintor afloat - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fontforge_stubs-2026.1.2.tar.gz.
File metadata
- Download URL: fontforge_stubs-2026.1.2.tar.gz
- Upload date:
- Size: 60.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fac4b98d2fd0aa650d1cbe13e9c32b13ca8cce04055d2a5dda5e51355c37f3f0
|
|
| MD5 |
1118179e2c44fefe3cc5ac757ee69329
|
|
| BLAKE2b-256 |
ad929171c93852072c680f8c693ee607a08fb8d05323d6d4385cf2d8ae118db2
|
Provenance
The following attestation bundles were made for fontforge_stubs-2026.1.2.tar.gz:
Publisher:
publish.yaml on chanicpanic/fontforge-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fontforge_stubs-2026.1.2.tar.gz -
Subject digest:
fac4b98d2fd0aa650d1cbe13e9c32b13ca8cce04055d2a5dda5e51355c37f3f0 - Sigstore transparency entry: 788874535
- Sigstore integration time:
-
Permalink:
chanicpanic/fontforge-stubs@9d25081501158d94fc87238ca85d9426e35db783 -
Branch / Tag:
refs/tags/v2026.1.2 - Owner: https://github.com/chanicpanic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9d25081501158d94fc87238ca85d9426e35db783 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fontforge_stubs-2026.1.2-py3-none-any.whl.
File metadata
- Download URL: fontforge_stubs-2026.1.2-py3-none-any.whl
- Upload date:
- Size: 62.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80633b56411387012bb33fced0352c5046aa8320acca7fc88eafda06660ffc0e
|
|
| MD5 |
adf2fa99819c07f739ce17758a7d0e6d
|
|
| BLAKE2b-256 |
9d5c48cf5ead39bdd8ea86b0fc203291e3915a44156ec0237324ff0055ad2230
|
Provenance
The following attestation bundles were made for fontforge_stubs-2026.1.2-py3-none-any.whl:
Publisher:
publish.yaml on chanicpanic/fontforge-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fontforge_stubs-2026.1.2-py3-none-any.whl -
Subject digest:
80633b56411387012bb33fced0352c5046aa8320acca7fc88eafda06660ffc0e - Sigstore transparency entry: 788874539
- Sigstore integration time:
-
Permalink:
chanicpanic/fontforge-stubs@9d25081501158d94fc87238ca85d9426e35db783 -
Branch / Tag:
refs/tags/v2026.1.2 - Owner: https://github.com/chanicpanic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9d25081501158d94fc87238ca85d9426e35db783 -
Trigger Event:
release
-
Statement type: