Python library for manipulating OpenType font features
Project description
fontFeatures library
If you're looking for the FEE language, it has been renamed to FEZ and moved to its own library (fez).
OpenType fonts are "programmed" using features, which are normally authored in Adobe's feature file format. This like source code to a computer program: it's a user-friendly, but computer-unfriendly, way to represent the features.
Inside a font, the features are compiled in an efficient internal format. This is like the binary of a computer program: computers can use it, but they can't do else anything with it, and people can't read it.
The purpose of this library is to provide a middle ground for representing features in a machine-manipulable format, kind of like the abstract syntax tree of a computer programmer. This is so that:
- features can be represented in a structured human-readable and machine-readable way, analogous to the XML files of the Unified Font Object format.
- features can be more directly authored by programs (such as font editors), rather than them having to output AFDKO feature file format.
- features can be easily manipulated by programs - for example, features from two files merged together, or lookups moved between languages.
How is this different from fontTool's
feaLib? I'm glad you asked.feaLibtranslates between the Adobe feature file format and a abstract syntax tree representing elements of the feature file - not representing the feature data. The AST is still "source equivalent". For example, when you code anaaltfeature in feature file format, you might include code likefeature saltto include lookups from another feature. But what's actually meant by that is a set of lookups.fontFeaturesallows you to manipulate meaning, not description.
Components
fontFeatures consists of the following components:
fontFeaturesitself, which is an abstract representation of the different layout operations inside a font.fontFeatures.feaLib(included as a mixin) which translates between Adobe feature syntax and fontFeatures representation.fontFeatures.ttLib, which translates between OpenType binary fonts and fontFeatures representation. (Currently only OTF ->fontFeaturesis partially implemented; there is nofontFeatures-> OTF compiler yet.)fontFeatures.fontDameLibwhich translate FontDame text files into fontFeatures objects.
And the following utilities:
otf2fea: translates an OTF file into Adobe features syntax.txt2fea: translates a FontDame txt file into Adobe features syntax.
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 fontfeatures-1.9.0.tar.gz.
File metadata
- Download URL: fontfeatures-1.9.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfa5481a4d7c8572d849ac5690a9e50ebc3618168b09797b9116716bc29d11f
|
|
| MD5 |
3dfbcd8cfea9162446ea8af397665201
|
|
| BLAKE2b-256 |
3ded249025ccb2e7f075eb6e032354cf19adb5c0fa37d0e467e5769f47790a82
|
Provenance
The following attestation bundles were made for fontfeatures-1.9.0.tar.gz:
Publisher:
ci.yml on simoncozens/fontFeatures
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fontfeatures-1.9.0.tar.gz -
Subject digest:
dcfa5481a4d7c8572d849ac5690a9e50ebc3618168b09797b9116716bc29d11f - Sigstore transparency entry: 251770591
- Sigstore integration time:
-
Permalink:
simoncozens/fontFeatures@360b0dc62b31e893ff2270d1ca3438f1e5b6616d -
Branch / Tag:
refs/tags/v1.9.0 - Owner: https://github.com/simoncozens
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@360b0dc62b31e893ff2270d1ca3438f1e5b6616d -
Trigger Event:
push
-
Statement type:
File details
Details for the file fontfeatures-1.9.0-py3-none-any.whl.
File metadata
- Download URL: fontfeatures-1.9.0-py3-none-any.whl
- Upload date:
- Size: 104.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7fcf48b77fa4f61fdffb5e28d588be05255fff0b54693c62de4013b129c3f1b
|
|
| MD5 |
e31ac968bf0f053fb599fa07cca0f65a
|
|
| BLAKE2b-256 |
8726a0369ad3be7c74fa13cd2dc687c083b26d65380310957f5736c1a32395b0
|
Provenance
The following attestation bundles were made for fontfeatures-1.9.0-py3-none-any.whl:
Publisher:
ci.yml on simoncozens/fontFeatures
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fontfeatures-1.9.0-py3-none-any.whl -
Subject digest:
d7fcf48b77fa4f61fdffb5e28d588be05255fff0b54693c62de4013b129c3f1b - Sigstore transparency entry: 251770594
- Sigstore integration time:
-
Permalink:
simoncozens/fontFeatures@360b0dc62b31e893ff2270d1ca3438f1e5b6616d -
Branch / Tag:
refs/tags/v1.9.0 - Owner: https://github.com/simoncozens
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@360b0dc62b31e893ff2270d1ca3438f1e5b6616d -
Trigger Event:
push
-
Statement type: