Skip to main content

Common routines for Fontforge plugins

Project description

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

Project details


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.1.2.tar.gz (3.6 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.1.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fontforge_plugin_helper-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 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.1.2.tar.gz
Algorithm Hash digest
SHA256 c7be444b7eff70742faf815da31d152d814dafa9b21a79cc1ab6d8a28523dc8b
MD5 28502e6ce033bd58b1c5f4c995f7aa65
BLAKE2b-256 e05a5fedf5a6ba8a374b4bb377cd484774f207f91ffe24d873de82a171af00e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontforge_plugin_helper-0.1.2.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.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fontforge_plugin_helper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a4e7aed5be0da22ebd3384442e98915ef284d39bad5d07e7fe2f463e68131e0
MD5 1b42b27b3b18e2142aa6544b48a5f8a4
BLAKE2b-256 a09222ca3472a0a11d9b536ba744951cb3efdf40429964b01f8aa2a1bc1c970f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontforge_plugin_helper-0.1.2-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 Pingdom Monitoring Sentry Error logging StatusPage Status page