Python script to merge Adobe feature files into a single variable feature file
Project description
feamerge
Merge Adobe feature files into a single variable feature file
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.
🔄 New Workflow
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)).
🚀 Installation
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 .
💻 Usage
Command Line (Recommended)
You no longer need to call individual Python files. Simply use the feamerge command:
feamerge path/to/YourFont.ufo MyFont.designspace variable_features.fea
Programmatic Usage
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")
📜 Changelog
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.
Key Features
-
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file feamerge-0.1.4.tar.gz.
File metadata
- Download URL: feamerge-0.1.4.tar.gz
- Upload date:
- Size: 46.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f757da772b733b1c56c86ffc29f75015e30636cf4d218217d19a22572904327d
|
|
| MD5 |
9ae7bfb0d3acdbdb56f08f276b89ba2b
|
|
| BLAKE2b-256 |
4c4d8c29e462878a8183808d900580a848dd206161f12fa57f56c330dde4ba58
|
Provenance
The following attestation bundles were made for feamerge-0.1.4.tar.gz:
Publisher:
pypi-publish.yaml on mitradranirban/feamerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feamerge-0.1.4.tar.gz -
Subject digest:
f757da772b733b1c56c86ffc29f75015e30636cf4d218217d19a22572904327d - Sigstore transparency entry: 1710481200
- Sigstore integration time:
-
Permalink:
mitradranirban/feamerge@9b64033c93a2d8d20b0c2e1781c3db9eb6080153 -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/mitradranirban
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@9b64033c93a2d8d20b0c2e1781c3db9eb6080153 -
Trigger Event:
release
-
Statement type:
File details
Details for the file feamerge-0.1.4-py3-none-any.whl.
File metadata
- Download URL: feamerge-0.1.4-py3-none-any.whl
- Upload date:
- Size: 36.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d010059d01206a45e6410f1a9c3908439393b12f88f628d861772b44ed52b550
|
|
| MD5 |
8bf6f7b98961d906ea3fb798ac5fc20f
|
|
| BLAKE2b-256 |
c5bf1d62f370ac9b5da4bab9c6173f6406957d90cc643c89f16d6a0c0f5b8d52
|
Provenance
The following attestation bundles were made for feamerge-0.1.4-py3-none-any.whl:
Publisher:
pypi-publish.yaml on mitradranirban/feamerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feamerge-0.1.4-py3-none-any.whl -
Subject digest:
d010059d01206a45e6410f1a9c3908439393b12f88f628d861772b44ed52b550 - Sigstore transparency entry: 1710481229
- Sigstore integration time:
-
Permalink:
mitradranirban/feamerge@9b64033c93a2d8d20b0c2e1781c3db9eb6080153 -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/mitradranirban
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@9b64033c93a2d8d20b0c2e1781c3db9eb6080153 -
Trigger Event:
release
-
Statement type: