feamerge is a tool designed to solve the challenge of compiling designspace files with varying OpenType features. It automates the preprocessing of UFO feature files—expanding kerning and positioning groups—before merging them into a valid variable font feature file.
Previously, this process required running three separate scripts manually. With version 0.1.1, these have been unified into a single command:
-
Break Kerning Groups: Expands @group definitions into individual glyph-to-glyph pairs.
-
Break Positioning Groups: Expands group references in mark, abvm, and blwm statements into single-glyph anchor rules.
-
Intelligent Merge: Combines the expanded features from all masters in the designspace into variable font syntax (e.g., pos A A (wght=400:10 wght=900:20)).
The package now supports standard Python installation, which automatically sets up the feamerge command in your environment.
# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
# Install the package and dependencies
pip install .
You no longer need to call individual Python files. Simply use the feamerge command:
feamerge path/to/YourFont.ufo MyFont.designspace variable_features.fea
If you still wish to use the combiner logic directly in a script:
from feamerge.combine_features import VariableFeatureCombiner
combiner = VariableFeatureCombiner("path/to/font.designspace")
combiner.save_combined_features("output/variable_features.fea")
v0.1.3
Bug Fixes & Pipeline Enhancements:
- Added
ufoLib2to packaging dependencies. - Corrected package license configuration file reference.
- Fixed CLI to preprocess all masters and properly chain sequential expansion steps.
- Implemented fallback to retrieve anchor coordinates from UFO glyph data for empty feature anchor definitions.
- Renamed and restructured combiner module to
combine_features.
v0.1.2
Package Restructuring: Moved all scripts into the feamerge/ package directory for proper bundling.
Unified CLI: Added a single feamerge entry point to run the entire preprocessing and merging sequence automatically.
Improved Metadata: Consolidated project configuration into pyproject.toml.
Version Bump: Updated version to 0.1.1.
v0.1.0
Initial release with separate scripts for kerning expansion and feature merging.
-
Designspace Integration: Handles both absolute and relative paths for UFO source references.
-
Variable Font Syntax: Generates coordinate:value pairs for positioning rules.
-
Intelligent Merging: Deduplicates glyph classes and maintains OpenType features across masters.