Expand description
Terminal glyphs, with an ASCII fallback for terminals not doing UTF-8 (SSH, a C locale), where Unicode would render as replacement boxes.
No Nerd Font glyphs. Every Unicode character passes the font-coverage audit
(scripts/code/audit_glyphs.py): present in JetBrainsMono Nerd Font, and never an
Emoji=Yes, Emoji_Presentation=No codepoint missing from Liberation Mono or Noto Sans
Mono (those fall back to the color-emoji font and draw blank or clipped). Nerd Font
icons appear only in the Omarchy menu and in users’ own [glyphs] overrides.
Structs§
- Glyphs
- Symbols used by the UI, in whichever alphabet the terminal can render.
- Plot
Marks - The marks ratatui’s
Chart,CanvasandBarChartdraw, and their axis and legend lines; ratatui ignores the locale, so each set names its own.
Enums§
- Slot
Override - One
[glyphs]override from the config: a single glyph, or a list for the slots that hold one (spinner,score_marks,mini_bars,bar_eighths). - Unicode
Mode - What the user asked for, from
[display] unicode.
Functions§
- active_
is_ unicode - Whether the active set is Unicode (copies of consts have no identifying address).
- ascii
- The ASCII set.
- asciify_
instructions - Instructional text mapped to ASCII for the help overlay on a non-UTF-8 terminal, at
the render boundary only (user data is never transliterated). Coverage is checked by
every_help_screen_is_ascii_clean. - cell_
width - Cells
texttakes in a table cell, grapheme by grapheme at ratatui’s widths: unlikedisplay_width, a joined emoji sequence counts once and control characters zero. - display_
width - Display columns
textoccupies; scalar counts get CJK and combining marks wrong. - dotted
- Text written with
·between its parts, in the glyph set’s middot:-on an ASCII terminal. A·in a UI string is this template, drawn through here. - environment_
is_ utf8 - Whether the terminal can be trusted with UTF-8:
LC_ALLoverLC_CTYPEoverLANG, as POSIX; with none set, only Windows counts. The locale, not terminal capability, decides whether multi-byte characters render. - fit
textinwidthcolumns, cut at its end and marked with the ellipsis.- fit_
cells textfitted towidthcells: whole if it fits, else cut at a grapheme boundary and closed withmarker(never half a wide character). Control characters are dropped, as ratatui drops them. Ifmarkeritself does not fit, as much as does.- fit_
middle textinwidthcolumns, cut from the middle:weather/…/daily.- fit_
start textinwidthcolumns, cut at its start: a path keeps its leaf. The ellipsis is measured, since it is three columns on an ASCII terminal.- get
- The active glyph set. Falls back to detection when
init_with_overrideswas never called, so library users and tests get sensible symbols without ceremony. - init_
with_ overrides - Choose the glyph set for this run, with
[glyphs]overrides over the Unicode set. Never over the ASCII set: it is the tested floor, where rich-font overrides would garble. Later calls are ignored. - instructions_
in_ ascii textwith every instructional character replaced by its (wider) ASCII twin. Help rows (key, two+ spaces, description) are re-padded per section, so descriptions stay aligned and a section shifts right together when a key outgrows its column.- take_
columns - The longest prefix of
textthat fitswidthdisplay columns, never splitting a wide character. - take_
columns_ end - The longest suffix of
textthat fitswidthdisplay columns, never splitting a wide character. - unicode
- The Unicode set, for tests and for callers that know their output is UTF-8.
- validate_
overrides - Check a
[glyphs]override map at load time, naming the bad slot. Each override must keep its glyph’s display width, so every layout width invariant holds.