OS Manuals

/opt/chainguard/gftools/bin/gftools-add-ds-subsets

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 gftools-add-ds-subsets --help (exit 0). permalink

usage: gftools-add-ds-subsets [-h] [--googlefonts] [--yaml YAML] [--repo REPO] [--file FILE]
                              [--name NAME] [--allow-sparse] [--codepoints CODEPOINTS] [--json]
                              [--exclude-codepoints EXCLUDE_CODEPOINTS]
                              [--exclude-codepoints-file EXCLUDE_CODEPOINTS_FILE]
                              [--exclude-glyphs EXCLUDE_GLYPHS]
                              [--exclude-glyphs-file EXCLUDE_GLYPHS_FILE] [--output OUTPUT]
                              input

 Add a subset from another font to a designspace file and save.

If --yaml is given, it should be a YAML file describing the subsets to
add. Otherwise, --repo and --file must be given to specify the source
repository (as username/repo pair from from GitHub) and file name within
the repository, and then either --name (to use a named subset from the
GF glyphsets) or --codepoints (to specify a range of codepoints to
subset, in the form <start>-<end>,<start>-<end>,... where `start` and
`end` are Unicode hex codepoints) must be given.

The YAML file should be a list of subsets, each of which should have a
`from` key to specify the donor font, and either a `name` key (to use a
named subset from the GF glyphsets) or a `ranges` key (to specify a
range of codepoints to subset). The `from` key can either be a string
(one of "Noto Sans", "Noto Serif", "Noto Sans Devanagari", "Noto Serif
Devanagari", "Noto Sans Linear B" or a dictionary with a `repo` key
specifying the GitHub repository (as username/repo pair) and a `path`
key specifying the file within the repository.

Example usage:

gftools-add-ds-subsets \
    --repo notofonts/latin-greek-cyrillic \
    --file sources/NotoSans-Italic.glyphspackage \
    --name "GF_Latin_Core" \
    -o full/NotoSansElymaic.designspace NotoSansElymaic.designspace

gftools-add-ds-subsets \
    --yaml subsets.yaml \
    -o full/NotoSansCypriot.designspace NotoSansCypriot.designspace

Where subsets.yaml is:

- from: Noto Sans
  name: GF_Latin_Core
- from: Noto Sans Linear B
  ranges:
    - start: 0x10100
      end: 0x10133

positional arguments:
  input                 Input designspace file

options:
  -h, --help            show this help message and exit
  --googlefonts         Restrict donor instances to Google Fonts styles
  --yaml, -y YAML       YAML file describing subsets
  --repo, -r REPO       GitHub repository slug to use for subsetting. Use @ after slug to specify
                        branch/tag/commit, e.g. org/repo@v0.1.0; 'latest' is supported for latest
                        release
  --file, -f FILE       Source file within GitHub repository
  --name, -n NAME       Name of subset to use from glyphset
  --allow-sparse        Allow skipping a non-default master missing from the donor designspace
  --codepoints, -c CODEPOINTS
                        Range of codepoints to subset
  --json, -j            Use JSON structured UFOs
  --exclude-codepoints EXCLUDE_CODEPOINTS
                        Space-delimited unicodes to exclude
  --exclude-codepoints-file EXCLUDE_CODEPOINTS_FILE
                        Newline delimited file with unicodes to exclude. Allows for comments with
                        either # or //
  --exclude-glyphs EXCLUDE_GLYPHS
                        Space-delimited glyph names to exclude
  --exclude-glyphs-file EXCLUDE_GLYPHS_FILE
                        Newline delimited file with glyph names to exclude. Allows for comments
                        with either # or //
  --output, -o OUTPUT   Output designspace file
Options (14)
OptionDescriptionSource
-h, --helpshow this help message and exithelp
--googlefontsRestrict donor instances to Google Fonts styleshelp
--yaml, -y YAMLYAML file describing subsetshelp
--repo, -r REPOGitHub repository slug to use for subsetting.help
--file, -f FILESource file within GitHub repositoryhelp
--name, -n NAMEName of subset to use from glyphsethelp
--allow-sparseAllow skipping a non-default master missing from the donor designspacehelp
--codepoints, -c CODEPOINTSRange of codepoints to subsethelp
--json, -jUse JSON structured UFOshelp
--exclude-codepoints EXCLUDE_CODEPOINTSSpace-delimited unicodes to excludehelp
--exclude-codepoints-file EXCLUDE_CODEPOINTS_FILENewline delimited file with unicodes to exclude.help
--exclude-glyphs EXCLUDE_GLYPHSSpace-delimited glyph names to excludehelp
--exclude-glyphs-file EXCLUDE_GLYPHS_FILENewline delimited file with glyph names to exclude.help
--output, -o OUTPUTOutput designspace filehelp

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