Fontforge plugin helper
A collection of common routines for Fontforge plugins
This module is intended to be called from Fontforge plugins. This module itself is not a Fontforge plugin.
Install
pip3 install fontforge_plugin_helper
Usage
Bézier-related features
fontforge_plugin_helper.getInterpolatedCoord()
contour = font['A'].layers[1][0]
x, y = fontforge_plugin_helper.getInterpolatedCoord(contour, 1.5)
fontforge_plugin_helper.getTangentAngle()
contour = font['A'].layers[1][0]
tangentAngle = fontforge_plugin_helper.getTangentAngle(contour, 1.5)
Glyph name related features
fontforge_plugin_helper.escapeGlyphName()
filename = '{0}.svg'.format(fontforge_plugin_helper.escapeGlyphName('A'))
Hook-related features
fontforge_plugin_helper.addSystemHook()
def myNewFontHook(font):
do_something
def myLoadFontHook(font):
do_something
def fontforge_plugin_init(**kw):
fontforge_plugin_helper.addSystemHook('newFontHook', myNewFontHook)
fontforge_plugin_helper.addSystemHook('loadFontHook', myLoadFontHook)
fontforge_plugin_helper.addFontGenerateHook()
def myPreGenerationHook(font):
do_something
def myPostGenerationHook(font):
do_something
def myNewOrLoadFontHook(font):
fontforge_plugin_helper.addFontGenerateHook(font,
'generateFontPreHook',
myPreGenerationHook)
fontforge_plugin_helper.addFontGenerateHook(font,
'generateFontPostHook',
myPostGenerationHook)
def fontforge_plugin_init(**kw):
fontforge_plugin_helper.addSystemHook('newFontHook', myNewOrLoadFontHook)
fontforge_plugin_helper.addSystemHook('loadFontHook', myNewOrLoadFontHook)
fontforge_plugin_helper.generationHookSetter()
def myPreGenerationHook(font):
do_something
def myPostGenerationHook(font):
do_something
def fontforge_plugin_init(**kw):
fontforge_plugin_helper.addSystemHook(
'newFontHook',
fontforge_plugin_helper.generationHookSetter(
myPreGenerationHook,
myPostGenerationHook,
)
)
fontforge_plugin_helper.addSystemHook(
'loadFontHook',
fontforge_plugin_helper.generationHookSetter(
myPreGenerationHook,
None, # if not needed
)
)
Translation-related features
class fontforge_plugin_helper.Translations
tr = fontforge_plugin_helper.Translations()
def spam(u, font):
pass
def fontforge_plugin_init(**kw):
tr.set('fr', '_Open', '_Ouvrir')
tr.setTranslations('fr', {
'_Open': '_Ouvrir',
'_Close': '_Fermer',
'_MyMenu': '_MonMenu',
})
tr.setTranslations('de', {
'_Open': 'Ö_ffnen',
'_Close': 'S_chließen',
'_MyMenu': '_MeinMenü',
})
fontforge.registerMenuItem(
callback=spam,
context="Font",
name=tr.get('_MyMenu')
)
Metadata
Release files for fontforge-plugin-helper 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fontforge_plugin_helper-0.4.0.tar.gz | 11.0 kB | With provenance | Details for fontforge_plugin_helper-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fontforge_plugin_helper-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for fontforge_plugin_helper-0.4.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / fontforge_plugin_helper-0.4.0.tar.gz
| Download URL | fontforge_plugin_helper-0.4.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2098134b674db45885a2bbe21970d1da8b5ac2967323658ef8a1139e8348fe35
|
|
BLAKE2b-256 checksum How to use checksums |
ee045a25b47c5d26fc49d72036f6e63e694e4c642377c2b0c397683ec319c084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 6, 2026.
Transparency logRelease files / fontforge_plugin_helper-0.4.0-py3-none-any.whl
| Download URL | fontforge_plugin_helper-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6ffd28e1b146969101b84b3698bbc0b8e1ef060beda1321416ec35d10a85fc7
|
|
BLAKE2b-256 checksum How to use checksums |
1c19e425ecc7ffa097a6284e45812daaa50422b3e670d490e64879782f240e58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 6, 2026.
Transparency logSecurity for fontforge-plugin-helper 0.4.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fontforge_plugin_helper-0.4.0.tar.gz
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 Sep 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.