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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fontforge_plugin_helper-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 4912c905b9a7ad9bc9ecd56cfad5ece2338a150ceb66b432e55628f3fe0e6dd2
MD5 81c6412e2d2fe5f70ee2352bf575362e
BLAKE2b-256 2c3b7485b309945eb4d96afc28605552e265beb682528d482ad4d4b0fab27388

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fontforge_plugin_helper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e27f4226a7def9ed11320bd829b79ab9c2734e8f7b42c2794f41c059c395d012
MD5 0fdaa18314e9ec7f72dfe1a2cb0ae810
BLAKE2b-256 e3f9234737162c64101f4f131d8e3b8599ec6436fd26baa23aaea77b4fb11c2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontforge_plugin_helper-0.1.0-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