You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#606 added Nerd Font file-type icons to the Explorer and Changes panel (explorer.icons / git.icons, "nerd-font" | "none"). Without a Nerd Font installed, the glyphs render as broken boxes, so the setting currently has to default conservatively (see the discussion on #606: "There doesn't seem to be a reliable way to detect if the font is available").
This issue tracks doing that detection properly, so icons can default to on for users who'll actually see them, without breaking the terminal for everyone else.
The problem
ttt runs inside an arbitrary terminal emulator and has no reliable way to ask "is the font you're rendering with a Nerd Font (or does it otherwise cover the glyph ranges we use)?" There's no escape sequence or env var that reports the active font. Fallback to plain Unicode was tried before (#135) and rejected as too visually busy.
Possible directions (not settled, open to better ideas)
Cell-width probing: query the terminal's reported width for a couple of known Nerd Font codepoints (via a CSI cell-size / cursor-position round trip similar to the appearance query added in feat: auto theme follows terminal appearance #607) and infer coverage from whether it renders as expected vs. a fallback-width box.
A one-time onboarding check: show a small sample of the glyphs on first run and ask "do these look right?", persisting the answer to settings instead of guessing silently.
Known-terminal allowlist: some terminals/configs (e.g. ships with a Nerd Font patched build, or common setups like Ghostty + a Nerd Font default) could be inferred from TERM_PROGRAM/similar env vars as a low-confidence heuristic, falling back to the explicit setting otherwise.
Whatever approach: it needs to fail safe (default to none on any doubt), since a broken glyph is a worse first impression than a missing icon.
Summary
#606 added Nerd Font file-type icons to the Explorer and Changes panel (
explorer.icons/git.icons,"nerd-font"|"none"). Without a Nerd Font installed, the glyphs render as broken boxes, so the setting currently has to default conservatively (see the discussion on #606: "There doesn't seem to be a reliable way to detect if the font is available").This issue tracks doing that detection properly, so icons can default to on for users who'll actually see them, without breaking the terminal for everyone else.
The problem
ttt runs inside an arbitrary terminal emulator and has no reliable way to ask "is the font you're rendering with a Nerd Font (or does it otherwise cover the glyph ranges we use)?" There's no escape sequence or env var that reports the active font. Fallback to plain Unicode was tried before (#135) and rejected as too visually busy.
Possible directions (not settled, open to better ideas)
CSIcell-size / cursor-position round trip similar to the appearance query added in feat: auto theme follows terminal appearance #607) and infer coverage from whether it renders as expected vs. a fallback-width box.TERM_PROGRAM/similar env vars as a low-confidence heuristic, falling back to the explicit setting otherwise.Whatever approach: it needs to fail safe (default to
noneon any doubt), since a broken glyph is a worse first impression than a missing icon.Related