Skip to main content

Fontforge OT Fixup

Fontforge_plugin to fix issues to generated OT font

Install

pip3 install fontforge_ot_fixup

Make sure Fontforge Python module is usable

In interactive mode of Python, run:

import fontforge

If it raises ModuleNotFoundError exception, install Fontforge first. If installed, make sure the build option set that the Python module gets also installed. If already so, Python interpreter does not recognize the module path where the required module.

export PYTHONPATH=/path/to/fontforge/python/module:$PYTHONPATH

Configuration

This plugin has configuration menu. Select File > Configure Plugins... > OT fixup utility and click Configure to open.

Configuration will be stored in ~/.config/fontforge/plugin/OT fixup utility.toml (for Linux.)

Fix post.isFixedPitch

Table: [hooks.post.isFixedPitch]
Keys: ttf and ufo
Type: bool

Enable or disable the font generation hook (see below.) Can be configured for each format, TTF (including OTF) and UFO.

Fix 'aalt' feature

Table: [hooks.GSUB.aalt]
Keys: ufo
Type: bool

Enable or disable the font generation hook (see below.) Only applicable for UFO.

Usage

In Fontforge GUI

This plugin adds following items into "Tools" menu:

  • Activate smart dropout

Activate smart dropout

This appends the following bytecode into prep table:

B8h    PUSHW
01FFh  511
85h    SCANCTRL
B0h    PUSHB
04h    4
8Dh    SCANTYPE

If already appended the menu will be disabled.

Hooks

This plugin installs new/load font hook that installs font generation hook. The latter automatically fixes certain issues in exported font.

Fix post.isFixedPitch

Fontforge may export with post.isFixedPitch = 0 even for monospace fonts. This is because Fontforge requires all glyph including combining marks have the same advance width in order to export with post.isFixedPitch = 1. This is usually inappropriate.

This hook fixes the flag after normal export referring only U+0020 to U+007E.

Works when exporting TTF, OTF, or UFO.

Fix OS/2.xAvgCharWidth

For OS/2.version ≥ 3, OS/2.xAvgCharWidth is calculated from all non-zero-width glyphs. However, this causes misbehavior for CJK monospaced fonts in certain environments. Such fonts have fullwidth (zenkaku) characters as opposed to halfwidth (hankaku) ones which corresponds to any glyphs in Western fonts.

This hook fixes the average width to what calculated from only U+0020 to U+007E. This is typically the advance width of halfwidth characters.

Works when exporting TTF or OTF. Monospaced fonts only.

Fix aalt feature

Fontforge can export UFO but lacks special handling for aalt feature. This may result an invalid feature file (*.ufo/feature.fea); it is that aalt cannot contain script or language instructions.

This hook fixes aalt feature, or adds it if it does not exist. Existing lookups in aalt features will be included as aalt-only ones.

Works only when exporting UFO.

In Python script

import fontforge
import fontforge_otfixup

font = fontforge.open('path/to/font.sfd')
sdActive = fontforge_otfixup.isSmartDropoutActive(font)
fontforge_otfixup.activateSmartDropout(font)

Metadata

Release files for fontforge-ot-fixup 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fontforge-ot-fixup 0.5.0
File Size Uploaded
fontforge_ot_fixup-0.5.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fontforge-ot-fixup 0.5.0
File Interpreter ABI Platform
fontforge_ot_fixup-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / fontforge_ot_fixup-0.5.0.tar.gz

Download URL fontforge_ot_fixup-0.5.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4f584818d54dd6a28e9f001eaa14cb0845819311fbe9d7ccd511dae97c5730d1
BLAKE2b-256 checksum
How to use checksums
3a6edcec083b48cc333b0c3b49d201ff62706e55e9f3aafc1e33546cbe75b783
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 Oct 10, 2026.

Transparency log

Release files / fontforge_ot_fixup-0.5.0-py3-none-any.whl

Download URL fontforge_ot_fixup-0.5.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b093ca36677839d407c0c00d7f4a33d814bd64aca4379fd8249c0a9896c961a
BLAKE2b-256 checksum
How to use checksums
1f462b971b09019915f33375e4b1def61d62069a5e45e91544d921972b14d671
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page