Merge together two source fonts in UFO format
Project description
ufomerge
This command line utility and Python library merges together two UFO source format fonts into a single file. It can be used to include glyphs from one font into another font. It takes care of handling:
- Glyph outlines and information
- Kerning
libentries- Including any needed components
- "Subsetting" and merging layout rules
Usage
To merge the glyphs of font-b.ufo into font-a.ufo and save as merged.ufo:
$ ufomerge --output merged.ufo font-a.ufo font-b.ufo
To include particular glyphs:
$ ufomerge --output merged.ufo --glyphs alpha,beta,gamma font-a.ufo font-b.ufo
To include glyphs referencing particular Unicode codepoints:
$ ufomerge --output merged.ufo --unicodes 0x03B1,0x03B2,0x03B3 font-a.ufo font-b.ufo
Other useful command line parameters:
-G/--glyphs-file: Read the glyphs from a file containing one glyph per line.-U/--codepoints-file: Read the Unicode codepoints from a file containing one codepoint per line.-x/--exclude-glyphs: Stop the given glyphs from being included.-v/--verbose: Be noisier.
What to do about existing glyphs:
--skip-existing(the default): If a glyph fromfont-balready exists infont-a, nothing happens.--replace-existing: If a glyph fromfont-balready exists infont-a, the new glyph replaces the old one.
What do to about OpenType layout (features.fea). Suppose there is a rule sub A B by C;, and the incoming glyphs are A and B:
--subset-layout(the default): the rule is dropped, becauseCis not part of the target glyphset. The ligature stops working.--layout-closure:Cis added to the target glyphset and merged intofont-aso the ligature continues to work.--ignore-layout: No layout rules are copied fromfont-bat all.
Usage as a Python library
ufomerge provides two functions, merge_ufos and subset_ufo. Both take ufoLib2.Font objects, and are documented in their docstrings.
License
This software is licensed under the Apache license. See LICENSE.
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 ufomerge-1.9.6.tar.gz.
File metadata
- Download URL: ufomerge-1.9.6.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e7b245f9ba8d792309c9d9509149eb34057164e9af4e61bbf644c6e498c380
|
|
| MD5 |
3f2688319cd8ad928fdd8170cdb01b90
|
|
| BLAKE2b-256 |
02e78834d9a4de4bac863ad3941969674ca84f36c5236f1e03d970595b0cf002
|
Provenance
The following attestation bundles were made for ufomerge-1.9.6.tar.gz:
Publisher:
ci.yml on googlefonts/ufomerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ufomerge-1.9.6.tar.gz -
Subject digest:
29e7b245f9ba8d792309c9d9509149eb34057164e9af4e61bbf644c6e498c380 - Sigstore transparency entry: 368568923
- Sigstore integration time:
-
Permalink:
googlefonts/ufomerge@9a4cc5c00f9653e2f49e47ab2f248d78122133ff -
Branch / Tag:
refs/tags/v1.9.6 - Owner: https://github.com/googlefonts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@9a4cc5c00f9653e2f49e47ab2f248d78122133ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file ufomerge-1.9.6-py3-none-any.whl.
File metadata
- Download URL: ufomerge-1.9.6-py3-none-any.whl
- Upload date:
- Size: 20.9 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 |
44525461e0e6a6159fdeeecbdc83be53b6da21b03702a70d9aa203092197f145
|
|
| MD5 |
c7f4178d31d3d6f73bf0c8e0218d0ac9
|
|
| BLAKE2b-256 |
77e45272749d6a72ccddc3adb3d086c8a7b14d25d67df5bde661fbc9b04e8fd8
|
Provenance
The following attestation bundles were made for ufomerge-1.9.6-py3-none-any.whl:
Publisher:
ci.yml on googlefonts/ufomerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ufomerge-1.9.6-py3-none-any.whl -
Subject digest:
44525461e0e6a6159fdeeecbdc83be53b6da21b03702a70d9aa203092197f145 - Sigstore transparency entry: 368568964
- Sigstore integration time:
-
Permalink:
googlefonts/ufomerge@9a4cc5c00f9653e2f49e47ab2f248d78122133ff -
Branch / Tag:
refs/tags/v1.9.6 - Owner: https://github.com/googlefonts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@9a4cc5c00f9653e2f49e47ab2f248d78122133ff -
Trigger Event:
push
-
Statement type: