HB-VIEW(1)

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

πŸ’… hb-view β€” the glow-up page (hb-view(1), User Commands)

okay bestie. so this is hb-view(1) β€” a User Commands girly from the HarfBuzz fam, and she is literally here to view text with a given font. that's the whole vibe. you hand her a font and some text, she renders it, she slays. let's get into it 🫢


✨ USAGE ✨

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

View text with given font. that's it, that's the gig πŸ’…


πŸŽ€ HELP OPTIONS πŸŽ€

like, ask for help, she loves that

  • -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-view β€” Options for output rendering
  • --help-output β€” Options for the destination & form of the output

πŸ¦‹ FONT-FACE OPTIONS πŸ¦‹

this is the "which face are we talking about" section, iykyk

  • --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
  • --list-face-loaders β€” List available face loaders and quit

🌸 FONT-INSTANCE OPTIONS 🌸

main character energy: the actual instance of the font

  • --font-size=1/2 integers or 'upem' β€” Font size (default: 256)
  • --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
  • --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 β€” heads up β€” 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. no text? she'll just read stdin, no biggie πŸ’–
  • --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 🧚

the before & after of it all

  • --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 πŸ”₯

shaping is literally her whole personality

  • --shapers=comma-separated list β€” Set shapers to use (default: graphite2,ot,fallback). Supported shapers are: graphite2/ot/fallback
  • --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

okay so 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's how it all works, no cap:

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

πŸ“ VIEW OPTIONS πŸ“

the aesthetic pass, lowkey the fun part

  • --background=rrggbb/rrggbbaa/none β€” Set background color (default: #FFFFFF); use "none" for transparent
  • --foreground=rrggbb/rrggbbaa[,...] β€” Set foreground color (default: #000000)
  • --rainbow β€” Rotate glyph foreground colors through a default palette 🌈
  • --font-palette=index β€” Set font palette (default: 0)
  • --custom-palette=comma-separated colors β€” Custom palette
  • --line-space=units β€” Set space between lines (default: 0)
  • --font-extents=one to three numbers β€” Set font ascent/descent/line-gap (default: auto)
  • --margin=one to four numbers β€” Margin around output (default: 16)
  • --logical β€” Render to logical box instead of union of logical and ink boxes
  • --ink β€” Render to ink box instead of union of logical and ink boxes
  • --show-extents β€” Draw glyph extents
  • --draw β€” Force monochrome draw path (overrides auto-detect)
  • --paint β€” Force color paint path (overrides auto-detect)

πŸ’œ OUTPUT DESTINATION & FORMAT OPTIONS πŸ’œ

where's it going and what's it giving

  • -o, --output-file=filename β€” Set output file-name (default: stdout)
  • -O, --output-format=format β€” Set output format (default: png). Supported output formats are: png/svg/pdf/ps/eps/script/ansi

⭐ APPLICATION OPTIONS ⭐

  • --version β€” Show version numbers
  • -n, --num-iterations=N β€” Run N iterations (default: 1)

shows image of rendering text with a given font in various formats. cute, useful, iconic πŸ’…


πŸ’€ EXIT CODES πŸ’€

like, so you know exactly what happened

  • 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 🌟

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 β€” go say hi, they're lovely 🫢


k that's the whole thing, bestie. you're basically a HarfBuzz girlie now. go render something gorgeous ✨

this page is brought to you by HarfBuzz 15.0.0, dated October 2026 β€” mwah, thanks for reading, ily, bye πŸ’–πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from