HB-SUBSET(1)

πŸ“¦
version 15.0.0 Β· 2 versions
, in arch rolling

πŸ’… HB-SUBSET(1) β€” the subsetter, but make it make sense

okay bestie, so this is hb-subset, a User Commands man page (section 1 of the manual, iykyk), and honestly? it's giving font-surgery main character energy. let's get into it ✨


🌸 NAME 🌸

hb-subset β€” Subset font to specification.

like, you take a whole font and you're like "girl, we only need these glyphs" and it's iconic about it. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

πŸ¦‹ Usage:

hb-subset [OPTION???] [FONT-FILE] [TEXT]

Subset font to specification. that's the whole vibe. you hand it a font, you tell it what you want to keep, it hands you back a smaller font. periodt. πŸ”₯

🧚 Help Options:

  • -h, --help β€” Show help options
  • --help-all β€” Show all help options
  • --help-face β€” Options for the font face
  • --help-subset-glyphset β€” Subsetting glyph-set options
  • --help-subset-other β€” Subsetting other options
  • --help-subset-flags β€” Subsetting boolean options
  • --help-output β€” Options for the destination & form of the output
ngl, when in doubt bestie: just mash --help-all and let it cook 🫢

πŸŽ€ Font-face options:

  • --font-file=filename β€” Set font file-name. this is your input font, the one you're about to glow-up.
  • -y, --face-index=index β€” Set face index (default: 0). for when your font file is a whole collection and you gotta pick one.
  • --face-loader=loader β€” Set face loader to use (default: ot). Supported face loaders are: ot/ft. two loaders, pick your fighter πŸ’…
  • --list-face-loaders β€” List available face loaders and quit. yes it just tells you the loaders and dips.

πŸ“ Subset glyph-set option:

  • -g, --gids=list of glyph indices/ranges or * β€” Specify glyph IDs or ranges to include in the subset. Use --gids-=... to subtract codepoints from the current set.
  • --gids-file=filename β€” Specify file to read glyph IDs or ranges from
  • --glyphs=list of glyph names or * β€” Specify glyph names to include in the subset. Use --glyphs-=... to subtract glyphs from the current set.
  • --glyphs-file=filename β€” Specify file to read glyph names from
  • -t, --text=string β€” Specify text to include in the subset. Use --text-=... to subtract codepoints from the current set.
  • --text-file=filename β€” Specify file to read text from
  • -u, --unicodes=list of hex numbers/ranges or * β€” Specify Unicode codepoints or ranges to include in the subset. Use * to include all codepoints. --unicodes-=... can be used to subtract codepoints from the current set. For example: --unicodes=* --unicodes-=41,42,43 would create a subset with all codepoints except for 41, 42, 43. (so basically "everything except these three, bestie, we don't want them" 😌)
  • --unicodes-file=filename β€” Specify file to read Unicode codepoints or ranges from
πŸ’€ note the pattern: the -= variants subtract from whatever set you already built up. the way that actually works is you build the set first, then subtract. k? πŸ’–

✨ Subset other option:

  • --gid-map=List of pairs old_gid1:new_gid1,old_gid2:new_gid2,... β€” Specify a glyph mapping to use, any unmapped gids will be automatically assigned. you're the one choosing the new IDs now, main character energy πŸ‘‘
  • --name-IDs=list of int numbers or * β€” Subset specified nameids. Use --name-IDs-=... to subtract from the current set.
  • --name-languages=list of int numbers or * β€” Subset nameRecords with specified language IDs. Use --name-languages-=... to subtract from the current set.
  • --layout-features=list of string table tags or * β€” Specify set of layout feature tags that will be preserved. Use --layout-features-=... to subtract from the current set.
  • --layout-scripts=list of string table tags or * β€” Specify set of layout script tags that will be preserved. Use --layout-scripts-=... to subtract from the current set.
  • --drop-tables=list of string table tags or * β€” Drop the specified tables. Use --drop-tables-=... to subtract from the current set.
  • --variations=list of comma separated axis-locations. β€” (Partially|Fully) Instantiate a variable font. A location consists of the tag of a variation axis, followed by '=', followed by a number or the literal string 'drop'. For example: --variations="wdth=100 wght=200" or --variations="wdth=drop". this is the variable-font glow-up right here πŸ”₯

🌈 Subset boolean option:

like, flags. you flip 'em and things happen. πŸ¦‹

  • --keep-everything β€” Keep everything by default. Options after this can override the operation. (order matters, bestie β€” it's a whole "what comes after counts" situation πŸ’…)
  • --no-hinting β€” Whether to drop hints
  • --retain-gids β€” If set don't renumber glyph ids in the subset.
  • --desubroutinize β€” Remove CFF/CFF2 use of subroutines
  • --downgrade-cff2 β€” Convert instantiated variable fonts from CFF2 to CFF1
  • --cff-identity-charset β€” Emit identity CFF charset (CID = new GID) for CID-keyed CFF
  • --name-legacy β€” Keep legacy (non-Unicode) 'name' table entries
  • --set-overlaps-flag β€” Set the overlaps flag on each glyph.
  • --notdef-outline β€” Keep the outline of '.notdef' glyph
  • --no-prune-unicode-ranges β€” Don't change the 'OS/2 ulUnicodeRange*' bits.
  • --no-layout-closure β€” Don't perform glyph closure for layout substitution (GSUB).
  • --no-bidi-closure β€” Don't perform bidi closure (adding mirrored variants) for input codepoints.
  • --glyph-names β€” Keep PS glyph names in TT-flavored fonts.
  • --passthrough-tables β€” Do not drop tables that the tool does not know how to subset.
  • --preprocess β€” If set preprocesses the face with the add accelerator option before actually subsetting.
  • --optimize β€” Perform IUP delta optimization on the resulting gvar table's deltas

πŸ’œ Output destination & format options:

  • -o, --output-file=filename β€” Set output file-name (default: stdout). so if you don't say anything, it just yeets the font straight at your terminal πŸ™ˆ

⭐ Application Options:

  • --version β€” Show version numbers
  • -n, --num-iterations=N β€” Run subsetter N times (default: 1). literally just do it again and again, N times. for science.

Subsets font file to a specified set of glyphs, Unicode codepoints, or text, design-space limiting, and other reductions. 🫢


🧚 EXIT CODES 🧚

  • 0: Success. slay. πŸ’–
  • 1: Option parsing failed. the options didn't make sense, bestie 😭
  • 2: Failed loading font face. the font said "no" πŸ’€

🌸 ENVIRONMENT 🌸

  • HB_FACE_LOADER=face-loader β€” Overrides the default face loader.

that's it, one env var, she's lowkey iconic like that ✨


πŸŽ€ SEE ALSO πŸŽ€

hb-view(1), hb-shape(1), hb-raster(1), hb-vector(1), hb-subset(1), hb-info(1)

Find more information or report bugs at <https://github.com/harfbuzz/harfbuzz>


okay and finally, the sign-off πŸ’… β€” this whole thing is HarfBuzz 15.0.0, dated October 2026, and it lives in section 1 (User Commands) of the manual. go forth and subset, bestie, you're gonna ate πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from