ufomerge(1)

NAME
ufomerge - Utility to merge two Unified Font Object (UFO) source fonts

SYNOPSIS
ufomerge [OPTIONS] PRIMARY_FONT.ufo SECONDARY_FONT.ufo

DESCRIPTION
ufomerge is a command-line utility and Python library designed to merge the contents of two UFO source format fonts into a single output file. It is commonly used to incorporate glyphs, kerning, or other data from a SECONDARY_FONT into a PRIMARY_FONT. The utility automatically handles the merging of core font data, including:

    •   Glyph outlines and information

    •   Kerning data

    •   Lib entries

    •   Necessary components

    •   Subsetting and merging of OpenType layout rules

OPTIONS

  General and Output

-h, --help
    Display a help message and exit.

-o PATH, --output=PATH
    Path for the output UFO file. If this option is omitted, the result will overwrite the PRIMARY_FONT.ufo in-place.

-v, --verbose
    Increase verbosity of the output.

  Glyph Selection

--glyphs NAMES
    A comma-separated list of glyph NAMES to include from the SECONDARY_FONT.

-G FILE, --glyphs-file=FILE
    Read the list of glyphs to be merged from a text FILE, with one glyph name per line.

--unicodes CODEPOINTS
    A comma-separated list of Unicode CODEPOINTS (e.g., 0x03B1) whose corresponding glyphs should be included from the SECONDARY_FONT.

-U FILE, --codepoints-file=FILE
    Read the list of Unicode codepoints from a text FILE, with one codepoint per line.

-x GLYPHS, --exclude-glyphs=GLYPHS
    A comma-separated list of GLYPHS that must not be included in the merge, even if they match other criteria.

  Conflict Resolution

--replace-existing
    If a glyph from SECONDARY_FONT already exists in PRIMARY_FONT, replace the existing glyph with the one from the secondary font.

--skip-existing
    If a glyph from SECONDARY_FONT already exists in PRIMARY_FONT, keep the existing glyph and skip the new one. This is the default behavior.

  OpenType Layout Handling (features.fea)
These options control how layout rules from the secondary font are merged, particularly when they reference glyphs not in the target set.

--subset-layout
    (Default) Drop layout rules if they reference glyphs that are not included in the merged glyphset. For example, in `sub A B by C;`, if C is missing, the rule is dropped.

--layout-closure
    If a layout rule references a glyph that is not already part of the target glyphset, automatically add that referenced glyph to the target and merge it into the PRIMARY_FONT.

--ignore-layout
    Discard all layout rules from the SECONDARY_FONT.

EXAMPLES

  Standard Merge
Merge all contents from font-b.ufo into font-a.ufo, saving the result to a new file:
ufomerge --output merged.ufo font-a.ufo font-b.ufo

  Selective Merge with Overwrite
Merge only glyphs "alpha", "beta", and "gamma", replacing them if they already exist:
ufomerge --output merged.ufo --glyphs alpha,beta,gamma --replace-existing font-a.ufo font-b.ufo

  Layout Closure Merge
Merge font-b.ufo ensuring that glyphs referenced by layout rules are also included:
ufomerge --output merged.ufo --layout-closure font-a.ufo font-b.ufo

AUTHORS
Maintained by the Google Fonts team and contributors. This manual page was derived from the project's upstream documentation.