Skip to main content

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

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
        )
    )

Download files

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

Source Distribution

fontforge_plugin_helper-0.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fontforge_plugin_helper-0.2.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file fontforge_plugin_helper-0.2.1.tar.gz.

File metadata

  • Download URL: fontforge_plugin_helper-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fontforge_plugin_helper-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4b80fa988e57fb09910d9c5951aeb2275bf18c1b40fda9a214b5ca4735ad0fe3
MD5 304eed29e4b1b58baae1f76604eecfa1
BLAKE2b-256 c79a6dbd7d230059916f8c3322697a42bd11fd722ab1b4b8c2b49fad8d94c11c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontforge_plugin_helper-0.2.1.tar.gz:

Publisher: python-publish.yml on MihailJP/fontforge-plugin-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fontforge_plugin_helper-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fontforge_plugin_helper-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b98b27492fad83f6d1168ba12930b0062eb19e3fd6278356898ecb861e6309a
MD5 4fe79d11aaaed51257e3c22bee70a926
BLAKE2b-256 9b1066d4716d44e83fd32dc55df4b7cbb267621acd67f0081ae19aa2d4fee53c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontforge_plugin_helper-0.2.1-py3-none-any.whl:

Publisher: python-publish.yml on MihailJP/fontforge-plugin-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page