fontmerge
fontmerge merges two font source files together, copying selected glyphs from a donor font into a host font, along with any necessary OpenType layout features. It is a font-merging toolkit that powers the fontmerge command-line tool.
Typical use cases include:
- Adding a set of glyphs (e.g. a Latin or Cyrillic extension) to an existing font.
- Copying glyphs selected by name or by Unicode codepoint from one source into another.
- Transporting OpenType layout rules (features, lookups, mark classes) alongside the glyphs they reference.
Merging is performed on font sources (Glyphs, UFO/DesignSpace, Babelfont JSON, ...) via the babelfont crate rather than on compiled binaries, so you keep full editability after the merge.
Command-line usage
Install the CLI with:
Merge all of Donor.glyphs into Host.glyphs:
Copy only specific glyphs by name:
Copy glyphs by Unicode codepoint (comma-separated, U+ prefix optional, ranges with a hyphen allowed):
Exclude glyphs you don't want to bring across:
By default, glyphs already present in the host font are skipped; use --existing-handling replace to overwrite them instead. Layout rules can be subset to the merged glyph set (default), closed over to pull in any extra glyphs referenced by rules (--layout-handling closure), or ignored entirely (--layout-handling ignore).
Using it as a library
The fontmerge crate is a mixed binary/library crate. Its library exposes the underlying merging routine so you can drive merges programmatically:
use ;
use ;
See the API documentation for details.
Status
fontmerge is in early development and its command-line interface and library API may change between releases.
License
fontmerge is available under the MIT or Apache-2.0 licenses, at your option. See LICENSE-MIT and LICENSE-APACHE.