Export OpenType Feature Files from FontForge
Exporting OpenType feature definitions from FontForge into an
external file allows you to inspect, back up, or reuse layout logic such
as ligatures, kerning, and stylistic alternates across different font
projects. FontForge supports saving these definitions directly as Adobe
Feature Files (.fea), a standard plain-text format
compatible with AFDKO, Glyphs, and various font build pipelines. You can
perform this export using either FontForge’s graphical user interface or
its built-in Python scripting environment.
Method 1: Exporting via the File Menu
The quickest way to export your OpenType features in the standard FontForge interface is through the primary menu:
- Open your font file (
.sfd,.otf, or.ttf) in FontForge. - Click File in the top menu bar.
- Select Generate Feature File... from the dropdown menu.
- In the file browser, choose your desired save location.
- Enter a name for the file, ensuring it ends with the
.feaextension (for example,features.fea). - Click Save.
Method 2: Exporting via the Font Info Dialog
If the direct file menu option is unavailable in your version build, you can export feature definitions through the font's lookup settings:
- Open your font in FontForge.
- Navigate to Element > Font Info
(or press
Ctrl + Shift + Fon Windows/Linux,Cmd + Shift + Fon macOS). - In the left-hand category list, select Lookups.
- Click the Save Feature File button located near the bottom of the dialog window.
- Select your target directory, assign a filename with the
.feaextension, and confirm by clicking Save. - Click OK to close the Font Info window.
Method 3: Exporting via Python Scripting
If you automate font builds or work in a headless environment, you can export the OpenType feature file programmatically using FontForge's Python module:
import fontforge
# Open the target font
font = fontforge.open("path/to/your/font.sfd")
# Generate the Adobe feature file
font.generateFeatureFile("output_features.fea")
# Close the font
font.close()Run this script using the FontForge binary directly from your terminal:
fontforge -script export_features.pyWhat the Exported File Contains
The generated .fea file uses Adobe's standard OpenType
Feature File syntax. It contains all existing lookups categorized into
their respective OpenType feature tags (such as liga,
kern, calt, and smcp), glyph
class definitions, and subtable structures present in your font. You can
edit this file in any plain-text editor and import it into another font
via File > Merge Feature
File....