HB-SHAPE(1)
π¦ hb-shape(1) β the bestie edit π¦
okay so welcome to hb-shape(1) from the User Commands section β this is the command that shapes text with the font you give it, and itβs genuinely giving main-character energy in the terminal. Hereβs every detail, no skips, no cap. π
β¨
π·οΈ NAME π·οΈ
hb-shape β shape text with given font.
π DESCRIPTION π
π Usage
hb-shape [OPTION???] [FONT-FILE] [TEXT]
Shape text with given font. literally thatβs the whole vibe: you bring the text, you bring the font, it does the shaping. periodt. πΈ
π Help Options
-h,--helpβ Show help options.--help-allβ Show all help options.--help-faceβ Options for the font face.--help-fontβ Options for the font instance.--help-variationsβ Options for font variations used.--help-textβ Options for the input text.--help-text-contextβ Options for the input context text.--help-shapeβ Options for the shaping process.--help-featuresβ Options for font features used.--help-outputβ Options for the destination & form of the output.--help-output-syntaxβ Options for the syntax of the output.
π€ Font-face options
--font-file=filenameβ Set font file-name.-y,--face-index=indexβ Set face index (default:0).--face-loader=loaderβ Set face loader to use (default:ot).- Supported face loaders are:
ot/ft.
- Supported face loaders are:
--list-face-loadersβ List available face loaders and quit.
π§Έ Font-instance options
--font-size=1/2 integers or 'upem'β Font size (default:upem).--font-ppem=1/2 integersβ Set x,y pixels per EM (default:0; disabled).--font-ptem=point-sizeβ Set font point-size (default:0; disabled).--font-bold=1/2 numbers; eg. 0.05β Set synthetic bold (default:0).--font-grade=1/2 numbers; eg. 0.05β Set synthetic grade (default:0).--font-slant=slant ratio; eg. 0.2β Set synthetic slant (default:0).--font-funcs=implβ Set font functions implementation to use (default:ot).- Supported font function implementations are:
ot/ft.
- Supported font function implementations are:
--list-font-funcsβ List available font functions and quit.--ft-load-flags=integerβ Set FreeType load-flags (default:2).
ποΈ Variations options
--named-instance=indexβ Set named-instance index (default: none).--variations=listβ Comma-separated list of font variations.
Variations are set globally. The format for specifying variation settings follows. All valid CSS font-variation-settings values other than 'normal' and 'inherited' are also accepted, though, not documented below.
The format is a tag, optionally followed by an equals sign, followed by a number. For example:
"wght=500" "slnt=-7.5"
π¬ Text options
If no text is provided, standard input is used for input.
--text=stringβ Set input text.--text-file=filenameβ Set input text file-name.-u,--unicodes=list of hex numbersβ Set input Unicode codepoints.--single-parβ Treat text as single paragraph.
π«§ Textual context options
--text-before=stringβ Set text context before each line.--text-after=stringβ Set text context after each line.--unicodes-before=list of hex numbersβ Set Unicode codepoints context before each line.--unicodes-after=list of hex numbersβ Set Unicode codepoints context after each line.
πͺ Shape options
--shapers=comma-separated listβ Set shapers to use (default:graphite2,ot,fallback).- Supported shapers are:
graphite2/ot/fallback.
- Supported shapers are:
--list-shapersβ List available shapers and quit.--direction=ltr/rtl/ttb/bttβ Set text direction (default:auto).--language=BCP 47 tagβ Set text language (default:$LANG).--script=ISO-15924 tagβ Set text script (default:auto).--botβ Treat text as beginning-of-paragraph.--eotβ Treat text as end-of-paragraph.--preserve-default-ignorablesβ Preserve Default-Ignorable characters.--remove-default-ignorablesβ Remove Default-Ignorable characters.--invisible-glyphβ Glyph value to replace Default-Ignorables with.--not-found-glyphβ Glyph value to replace not-found characters with.--not-found-variation-selector-glyphβ Glyph value to replace not-found variation-selector characters with.--utf8-clustersβ Use UTF8 byte indices, not char indices.--cluster-level=0/1/2/3β Cluster merging level (default:0).--normalize-glyphsβ Rearrange glyph clusters in nominal order.--unsafe-to-concatβ Produce unsafe-to-concat glyph flag.--safe-to-insert-tatweelβ Produce safe-to-insert-tatweel glyph flag.--glyphsβ Interpret input as glyph string.--verifyβ Perform sanity checks on shaping results.
π Features options
--features=listβ Comma-separated list of font features.
Features can be enabled or disabled, either globally or limited to specific character ranges. The format for specifying feature settings follows. All valid CSS font-feature-settings values other than 'normal' and the global values are also accepted, though not documented below. CSS string escapes are not supported. The range indices refer to the positions between Unicode characters, unless the --utf8-clusters is provided, in which case range indices refer to UTF-8 byte indices. The position before the first character is always 0.
The format is Python-esque. Here is how it all works:
Syntax:
Value: Start: End:
Setting value:
"kern" 1 0 ??? # Turn feature on
"+kern"
1 0 ??? # Turn feature on
"-kern"
0 0 ??? # Turn feature off
"kern=0"
0 0 ??? # Turn feature off
"kern=1"
1 0 ??? # Turn feature on
"aalt=2"
2 0 ??? # Choose 2nd alternate
Setting index:
"kern[]"
1 0 ??? # Turn feature on
"kern[:]"
1 0 ??? # Turn feature on
"kern[5:]"
1 5 ??? # Turn feature on, partial
"kern[:5]"
1 0 5 # Turn feature on, partial
"kern[3:5]"
1 3 5 # Turn feature on, range
"kern[3]"
1 3 3+1 # Turn feature on, single char
Mixing it all:
"aalt[3:5]=2" 2
3 5 # Turn 2nd alternate on for range
π¨οΈ Output destination & format options
-o,--output-file=filenameβ Set output file-name (default:stdout).-O,--output-format=formatβ Set output format (default:text).- Supported output formats are:
text/json.
- Supported output formats are:
π§Ύ Output syntax
text: [<glyph name or index>=<glyph cluster index within input>@<horizontal displacement>,<vertical displacement>+<horizontal advance>,<vertical advance>|...] json: [{"g": <glyph name or index>, "ax": <horizontal advance>, "ay": <vertical advance>, "dx": <horizontal displacement>, "dy": <vertical displacement>, "cl": <glyph cluster index within input>}, ...]
ποΈ Output syntax options
--show-textβ Prefix each line of output with its corresponding input text.--show-unicodeβ Prefix each line of output with its corresponding input codepoint(s).--show-line-numβ Prefix each line of output with its corresponding input line number.-v,--verboseβ Prefix each line of output with all of the above.--no-glyph-namesβ Output glyph indices instead of names.--no-positionsβ Do not output glyph positions.--no-advancesβ Do not output glyph advances.--no-clustersβ Do not output cluster indices.--show-extentsβ Output glyph extents.--show-flagsβ Output glyph flags.--nedβ No Extra Data; Do not output clusters or advances.-V,--traceβ Output interim shaping results.
π Application Options
--versionβ Show version numbers.-n,--num-iterations=Nβ Run N iterations (default:1).
Shows results of shaping text with a given font in textual or JSON format.
πͺ EXIT CODES πͺ
0: Success.1: Option parsing failed.2: Failed loading font face.3: Operation failed.4: Failed setting font functions.
πΏ ENVIRONMENT πΏ
HB_FACE_LOADER=face-loader; Overrides the default face loader.HB_FONT_FUNCS=font-funcs; Overrides the default font-funcs.HB_SHAPER_LIST=shaper-list; Overrides the default shaper list.
π SEE ALSO π
Find more information or report bugs at https://github.com/harfbuzz/harfbuzz.
π thatβs the whole hb-shape(1) bestie briefing β brought to you by HarfBuzz 15.0.0 and stamped October 2026. go shape something iconic π
β¨
π¦ where this page comes from
- arch rolling: harfbuzz-utils 15.0.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms