Fix OpenType Features Not Working in FontForge
OpenType features in FontForge can fail due to syntax errors, improperly configured lookup tables, naming discrepancies, or incorrect export settings. This troubleshooting guide provides a step-by-step approach to diagnosing and resolving these failures, covering everything from internal lookup validation and glyph naming checks to font generation settings and external rendering tests.
1. Verify Lookups and Subtables
OpenType features rely entirely on correctly structured lookups. Navigate to Element > Font Info > Lookups to inspect your layout tables:
- Ensure your lookup is assigned to the correct table:
GSUB (Glyph Substitution) for features like ligatures
(
liga), contextual alternates (calt), and small caps (smcp); or GPOS (Glyph Positioning) for kerning (kern) and mark attachment (mark). - Verify that each lookup contains at least one subtable. An empty lookup will not execute.
- Confirm that the appropriate script and language systems are tagged
(for example,
latn{dflt}for Latin default). If the target language is missing, the feature will not fire in applications matching that locale.
2. Confirm Lookup Execution Order
Lookups execute sequentially from top to bottom. If a preceding lookup substitutes a glyph that a subsequent lookup relies upon, the second lookup will fail. In the Lookups pane, use the order controls to place broader substitutions (like decomposition or contextual rules) ahead of ligature replacements or positional adjustments.
3. Check Glyph Names and Unicode Encoding
FontForge uses glyph names to map substitutions accurately:
- Avoid spaces, special symbols, or non-standard characters in glyph
names. Stick to standard Adobe Glyph Naming conventions (e.g.,
f_ifor an "fi" ligature, ora.scfor a small cap). - Do not assign duplicate glyph names within the font.
- Ensure substituted glyphs that do not require independent keyboard
input are unencoded (Unicode set to
-1) to prevent mapping conflicts, while base glyphs have their standard Unicode values assigned.
4. Test Lookups in the Metrics Window
Test whether the failure is occurring inside FontForge or strictly within external applications:
- Open Window > New Metrics Window.
- Type the character sequence meant to trigger the feature.
- Check the Features menu within the Metrics Window
and ensure the specific tag (e.g.,
liga,kern) is checked. - If the feature fails to render here, the error lies inside the lookup definition or glyph references. If it functions here, the issue is related to export settings or application-level support.
5. Validate OpenType Feature File Syntax
If you write or import OpenType features via Adobe FEA syntax (File > Merge Feature INFO):
- Check the output console for syntax warnings or parse errors during import.
- Common syntax errors include missing semicolons, undefined glyph classes, or typos in feature tags.
- Ensure all glyph names listed in the
.feafile match the internal glyph names in your FontForge project exactly.
6. Review Font Generation Options
OpenType tables might be stripped during export if the generation settings are misconfigured:
- Go to File > Generate Fonts.
- Select either OpenType (CFF) (
.otf) or TrueType (.ttf). - Click the Options button.
- Ensure OpenType is selected to include GSUB, GPOS, and GDEF tables.
- Ensure options that discard layout data, such as stripping feature tables, are disabled.
- Validate that FontForge does not display critical validation errors regarding overlapping contours or missing points prior to export.
7. Clear System Font Caches and Test in Supported Software
If the exported font fails in external software despite passing internal tests:
- Clear the operating system font cache or rename the font family before re-exporting to avoid cached versions overriding your updates.
- Test the font in software with native OpenType support (such as
Adobe InDesign, Affinity Designer, or a modern web browser with CSS
font-feature-settingsenabled), as basic text editors often disable advanced OpenType features by default.