OS Manuals

/opt/chainguard/gftools/bin/fontmake

Google Fonts Tools: build, fix, check and package fonts for the Google Fonts library

From gftools 0.10.8-r0 (os), captured 2026-11-05 by running fontmake --help (exit 0). permalink

usage: fontmake [-h] [--version] [-g GLYPHS | -u UFO [UFO ...] | -m DESIGNSPACE]
                [--glyph-data GLYPHDATA] [-o FORMAT [FORMAT ...]] [--output-path OUTPUT_PATH |
                --output-dir OUTPUT_DIR] [-i [INSTANCE_NAME]]
                [--variable-fonts [VARIABLE_FONT_FILENAME]] [-M] [--family-name FAMILY_NAME]
                [--round-instances] [--designspace-path DESIGNSPACE_PATH]
                [--master-dir MASTER_DIR] [--instance-dir INSTANCE_DIR]
                [--no-write-skipexportglyphs] [--validate-ufo] [--check-compatibility |
                --no-check-compatibility] [--expand-features-to-instances]
                [--fea-include-dir FEA_INCLUDE_DIR] [--no-generate-GDEF] [--save-ufo-as-zip |
                --ufo-structure {package,zip,json}] [--indent-json] [--keep-overlaps]
                [--overlaps-backend BACKEND] [--keep-direction]
                [--ttf-curves {cu2qu,mixed,keep-quad,keep-cubic}] [-e ERROR] [-f] [-a [AUTOHINT]]
                [-A] [--cff-round-tolerance FLOAT] [--optimize-cff OPTIMIZE_CFF]
                [--subroutinizer {compreffor,cffsubr}] [--no-optimize-gvar] [--filter CLASS]
                [--no-auto-use-my-metrics] [--auto-use-my-metrics] [--drop-implied-oncurves]
                [--interpolate-binary-layout [MASTER_DIR]] [--feature-writer CLASS]
                [--debug-feature-file FILE] [--no-variable-features] [--mti-source MTI_SOURCE]
                [--production-names | --no-production-names] [--subset | --no-subset] [-s | -S]
                [--timing] [--verbose LEVEL]
                [INPUTS ...]

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --production-names    Rename glyphs with production names if available otherwise use uninames.
  --no-production-names
  --subset              Subset font using export flags set by glyphsLib
  --no-subset
  -s, --subroutinize    Optimize CFF table using compreffor (default) [DEPRECATED: use --optimize-
                        cff option instead]
  -S, --no-subroutinize

Input arguments (flags):
  The following arguments are mutually exclusive (pick only one):

  -g, --glyphs-path GLYPHS
                        Path to .glyphs source file
  -u, --ufo-paths UFO [UFO ...]
                        One or more paths to UFO files
  -m, --mm-designspace DESIGNSPACE
                        Path to .designspace file

Input arguments (positonal):
  Alternatively, guess source format from filename extension

  INPUTS                Either one *.designspace or *.glyphs file, or one or more *.ufo

Other input arguments:
  --glyph-data GLYPHDATA
                        Custom GlyphData XML file with glyph info (production name, script,
                        category, subCategory, etc.). Can be used more than once (for Glyphs
                        sources only).

Output arguments:
  -o, --output FORMAT [FORMAT ...]
                        Output font formats. Choose 1 or more from: ufo, otf, otf-cff2, ttf, ttf-
                        interpolatable, otf-interpolatable, variable, variable-cff2. Default: otf,
                        ttf. (No file paths).
  --output-path OUTPUT_PATH
                        Output font file path. Only valid when the output is a single file (e.g.
                        input is a single UFO or output is a single variable font)
  --output-dir OUTPUT_DIR
                        Output folder. By default, output folders are created in the current
                        working directory, grouping output fonts by format.
  -i, --interpolate [INSTANCE_NAME]
                        Interpolate masters and generate all the instances defined. To only
                        interpolate a specific instance (or instances) that match a given "name"
                        attribute, you can pass as argument the full instance name or a regular
                        expression. E.g.: -i "Noto Sans Bold"; or -i ".* UI Condensed". (for
                        Glyphs or DesignSpace sources only).
  --variable-fonts [VARIABLE_FONT_FILENAME]
                        Filter the list of variable fonts produced from the input Designspace
                        file. By default all listed variable fonts are generated. To generate a
                        specific variable font (or variable fonts) that match a given "filename"
                        attribute, you can pass as argument the full filename or a regular
                        expression. E.g.: --variable-fonts "MyFontVF_WeightOnly.ttf"; or
                        --variable-fonts "MyFontVFItalic_.*.ttf".
  -M, --masters-as-instances
                        Output masters as instances
  --family-name FAMILY_NAME
                        Family name to use for masters, and to filter output instances
  --round-instances     Apply integer rounding to all geometry when interpolating
  --designspace-path DESIGNSPACE_PATH
                        Path to output designspace file (for Glyphs sources only).
  --master-dir MASTER_DIR
                        Directory where to write master UFO. Default: "./master_ufo". If value is
                        "{tmp}", a temporary directory is created and removed at the end (for
                        Glyphs sources only).
  --instance-dir INSTANCE_DIR
                        Directory where to write instance UFOs. Default: "./instance_ufo". If
                        value is "{tmp}", a temporary directory is created and removed at the end
                        (for Glyphs sources only).
  --no-write-skipexportglyphs
                        Do not store the glyph export flags in the 'public.skipExportGlyphs' key
                        of designspace/UFO lib, but use the old private glyph lib key
                        'com.schriftgestaltung.Glyphs.Export' (for Glyphs sources only).
  --validate-ufo        Enable ufoLib validation on reading/writing UFO files. It is disabled by
                        default
  --check-compatibility
                        Check if the source files are interpolatable. It is disabled by default,
                        but enabled when building variable fonts or what the 'Enforce
                        Compatibility Check' custom parameter is set on a Glyphs file
  --no-check-compatibility
                        Turns off the compatibility checker even when building variable fonts
  --expand-features-to-instances
                        Resolves all include()s in the master feature file and writes the full
                        feature file to all instance UFOs. Only valid when interpolating. Use if
                        you share feature files of masters in external files, as instances can end
                        up elsewhere.
  --fea-include-dir FEA_INCLUDE_DIR
                        Overrides the default directory where to search for included feature files
                        with relative paths. This only works when the input is a Designspace or
                        UFOs, not from Glyphs at the moment.
  --no-generate-GDEF    Do not auto-generate a GDEF table, but keep an existing one intact.
  --save-ufo-as-zip     Deprecated. Use --ufo-structure=zip instead.
  --ufo-structure {package,zip,json}
                        Select UFO format structure. Choose between: package, zip, json (default:
                        package). NOTE: json export is unofficial/experimental.
  --indent-json         Whether to format the JSON files created with --ufo-structure=json as
                        multiple lines with 2-space indentation. Default: single line, no indent.

Handling of contours:
  --keep-overlaps       Do not remove any overlap.
  --overlaps-backend BACKEND
                        Select library to remove overlaps. Choose between: booleanOperations,
                        pathops (default: booleanOperations)
  --keep-direction      Do not reverse contour direction when output is ttf or ttf-interpolatable
  --ttf-curves {cu2qu,mixed,keep-quad,keep-cubic}
                        Controls conversion of cubic Bézier curves to TrueType quadratic splines.
                        By default ('cu2qu'), all cubics are converted to quadratic (glyf v0).
                        With 'mixed', cubics are converted to quadratic only when more economical.
                        If 'keep-quad' or 'keep-cubic', cu2qu is skipped altogether and curves are
                        compiled unchanged. NOTE: cubics in TTF use glyf v1 which is still draft!
  -e, --conversion-error ERROR
                        Maximum approximation error for cubic to quadratic conversion measured in
                        EM
  -f, --flatten-components
                        Flatten nested components to single level.
  -a, --autohint [AUTOHINT]
                        Run ttfautohint. Can provide arguments, quoted. By default, ttfautohint is
                        run if the (.glyphs) source contains a 'TTFAutohint options' instance
                        custom parameter. This option overrides that. See --no-autohint to
                        disable.
  -A, --no-autohint     Do not run ttfautohint, even if source contains a 'TTFAutohint options'
                        custom parameter
  --cff-round-tolerance FLOAT
                        Restrict rounding of point coordinates in CFF table to only those floats
                        whose absolute difference from their integral part is less than or equal
                        to the tolerance. By default, all floats are rounded to integer (tolerance
                        0.5); 0 disables rounding.
  --optimize-cff OPTIMIZE_CFF
                        0 disables all optimizations; 1 specializes the CFF charstring operators;
                        2 (default) also enables subroutinization
  --subroutinizer {compreffor,cffsubr}
                        name of the library to use for compressing CFF charstrings. Choose
                        between: compreffor, cffsubr. By default compreffor is used for CFF 1, and
                        cffsubr for CFF2. NOTE: compreffor doesn't support CFF2.
  --no-optimize-gvar    Do not perform IUP optimization on variable font's 'gvar' table. (only
                        works with 'variable' TrueType-flavored output)
  --filter CLASS        string specifying a filter class to load, either built-in or from an
                        external module, optionally initialized with the given keyword arguments.
                        The class and module names are separated by '::'. The option can be
                        repeated multiple times for each filter class. The option overrides the
                        filters specified in the UFO lib. You can use an ellipsis --filter='...'
                        to keep the latter and insert additional --filter(s), either before or
                        after it.
  --no-auto-use-my-metrics
  --auto-use-my-metrics
                        Automatically set (or not) USE_MY_METRICS glyf component flags (0x0200).
                        By default, fontmake only enables this for static fonts, though it can
                        also be enabled for variable fonts. This is not needed unless the font is
                        going to have hinted horizontal glyph metrics.
  --drop-implied-oncurves
                        drop on-curve points that can be implied when exactly in the middle of two
                        off-curve points (TrueType only; default: False).

Handling of OpenType Layout:
  --interpolate-binary-layout [MASTER_DIR]
                        Interpolate layout tables from compiled master binaries. Requires Glyphs
                        or DesignSpace source.
  --feature-writer CLASS
                        string specifying a feature writer class to load, either built-in or from
                        an external module, optionally initialized with the given keyword
                        arguments. The class and module names are separated by '::'. The option
                        can be repeated multiple times for each writer class. A special value of
                        'None' will disable all automatic feature generation. The option overrides
                        both the default ufo2ft writers and those specified in the UFO lib. You
                        can use ellipsis --feature-writer='...' to keep the latter and insert
                        additional --feature-writer(s) either before or after those.
  --debug-feature-file FILE
                        Path were to dump OpenType features text to debug auto-generated features
                        (kern, mark, mkmk, etc.).
  --no-variable-features
                        Disable generation of variable FEA in ufo2ft when compiling VFs; instead
                        build separate OT layout tables for each master and merge them with
                        varLib.
  --mti-source MTI_SOURCE
                        mtiLib feature definition .plist file path (use instead of FEA)

Logging arguments:
  --timing              Print the elapsed time for each steps
  --verbose LEVEL       Configure the logger verbosity level. Choose between: DEBUG, INFO,
                        WARNING, ERROR, CRITICAL. Default: INFO
Options (54)
OptionDescriptionSource
-h, --helpshow this help message and exithelp
--versionshow program's version number and exithelp
--production-namesRename glyphs with production names if available otherwise use uninames.help
--no-production-nameshelp
--subsetSubset font using export flags set by glyphsLibhelp
--no-subsethelp
-s, --subroutinizeOptimize CFF table using compreffor (default) [DEPRECATED: use --optimize- cff option instead]help
-S, --no-subroutinizehelp
-g, --glyphs-path GLYPHSPath to .glyphs source filehelp
-m, --mm-designspace DESIGNSPACEPath to .designspace filehelp
--glyph-data GLYPHDATACustom GlyphData XML file with glyph info (production name, script, category, subCategory, etc.).help
--output-path OUTPUT_PATHOutput font file path.help
--output-dir OUTPUT_DIROutput folder.help
-i, --interpolate INSTANCE_NAMEInterpolate masters and generate all the instances defined.help
--variable-fonts VARIABLE_FONT_FILENAMEFilter the list of variable fonts produced from the input Designspace file.help
-M, --masters-as-instancesOutput masters as instanceshelp
--family-name FAMILY_NAMEFamily name to use for masters, and to filter output instanceshelp
--round-instancesApply integer rounding to all geometry when interpolatinghelp
--designspace-path DESIGNSPACE_PATHPath to output designspace file (for Glyphs sources only).help
--master-dir MASTER_DIRDirectory where to write master UFO.help
--instance-dir INSTANCE_DIRDirectory where to write instance UFOs.help
--no-write-skipexportglyphsDo not store the glyph export flags in the 'public.skipExportGlyphs' key of designspace/UFO lib, but use the old private glyph lib key 'com.schriftgestaltung.Glyphs.Export' (for Glyphs sources only).help
--validate-ufoEnable ufoLib validation on reading/writing UFO files.help
--check-compatibilityCheck if the source files are interpolatable.help
--no-check-compatibilityTurns off the compatibility checker even when building variable fontshelp
--expand-features-to-instancesResolves all include()s in the master feature file and writes the full feature file to all instance UFOs.help
--fea-include-dir FEA_INCLUDE_DIROverrides the default directory where to search for included feature files with relative paths.help
--no-generate-GDEFDo not auto-generate a GDEF table, but keep an existing one intact.help
--save-ufo-as-zipDeprecated.help
--ufo-structure packageSelect UFO format structure.help
--indent-jsonWhether to format the JSON files created with --ufo-structure=json as multiple lines with 2-space indentation.help
--keep-overlapsDo not remove any overlap.help
--overlaps-backend BACKENDSelect library to remove overlaps.help
--keep-directionDo not reverse contour direction when output is ttf or ttf-interpolatablehelp
--ttf-curves cu2quControls conversion of cubic Bézier curves to TrueType quadratic splines.help
-e, --conversion-error ERRORMaximum approximation error for cubic to quadratic conversion measured in EMhelp
-f, --flatten-componentsFlatten nested components to single level.help
-a, --autohint AUTOHINTRun ttfautohint.help
-A, --no-autohintDo not run ttfautohint, even if source contains a 'TTFAutohint options' custom parameterhelp
--cff-round-tolerance FLOATRestrict rounding of point coordinates in CFF table to only those floats whose absolute difference from their integral part is less than or equal to the tolerance.help
--optimize-cff OPTIMIZE_CFF0 disables all optimizations;help
--subroutinizer comprefforname of the library to use for compressing CFF charstrings.help
--no-optimize-gvarDo not perform IUP optimization on variable font's 'gvar' table.help
--filter CLASSstring specifying a filter class to load, either built-in or from an external module, optionally initialized with the given keyword arguments.help
--no-auto-use-my-metricshelp
--auto-use-my-metricsAutomatically set (or not) USE_MY_METRICS glyf component flags (0x0200).help
--drop-implied-oncurvesdrop on-curve points that can be implied when exactly in the middle of two off-curve points (TrueType only;help
--interpolate-binary-layout MASTER_DIRInterpolate layout tables from compiled master binaries.help
--feature-writer CLASSstring specifying a feature writer class to load, either built-in or from an external module, optionally initialized with the given keyword arguments.help
--debug-feature-file FILEPath were to dump OpenType features text to debug auto-generated features (kern, mark, mkmk, etc.).help
--no-variable-featuresDisable generation of variable FEA in ufo2ft when compiling VFs;help
--mti-source MTI_SOURCEmtiLib feature definition .plist file path (use instead of FEA)help
--timingPrint the elapsed time for each stepshelp
--verbose LEVELConfigure the logger verbosity level.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.