Skip to content

Powerline arrows and caps turn into "|" although a capable font is installed (Nerd Fonts v3 names, fonts in subfolders, built-in terminal glyphs) #62

Closed

Description

@axisrow

What you see

With Powerline mode on, every separator and every start/end cap renders as | instead of an arrow or a rounded cap, even though the terminal font draws those glyphs fine:

|  Model: Opus 4.6 | Session: 1hr 30m | Cost: $0.42 |

expected:

  Model: Opus 4.6  Session: 1hr 30m  Cost: $0.42 

The TUI's Powerline Setup also reports Font Status: ✗ Not Installed - Press (i) to install Powerline fonts.

C — before: the same font file under its v3 and v2 names

How to reproduce

The same font file gives both results; only its name differs.

  1. Put JetBrainsMonoNerdFont-Regular.ttf (Nerd Fonts v3, e.g. the Homebrew font-jetbrains-mono-nerd-font cask) in ~/.local/share/fonts/ on Linux or ~/Library/Fonts/ on macOS.
  2. Enable Powerline mode with any theme and caps.
  3. Pipe a status payload, and every separator and cap is |.
  4. Rename the same file to the old v2 style, JetBrains Mono Regular Nerd Font Complete.ttf, and the arrows and caps render.

Why

The fallback added in #13 replaces Private Use Area glyphs with | when no Powerline font is detected:

  • fontSafeSeparator → getCachedPowerlineFontStatus → checkPowerlineFonts (src/utils/powerline.ts)
  • The detection is a top-level readdirSync of the font folders, matched against file-name regexes.

It misses common setups:

  • Nerd Fonts v3 file names have no space. /nerd font/i does not match JetBrainsMonoNerdFont-Regular.ttf, HackNerdFont-Regular.ttf or CaskaydiaCoveNerdFont-Regular.ttf.
  • Fonts in subfolders are never seen. For example ~/.local/share/fonts/NerdFonts/..., /usr/share/fonts/TTF/..., or /usr/share/fonts/opentype/PowerlineSymbols.otf from the Debian fonts-powerline package.
  • Terminals with built-in Powerline glyphs have no font file to find. Ghostty, kitty and WezTerm draw these glyphs themselves, and SSH sessions keep the fonts on the client machine.
  • The TUI can contradict itself. Powerline Setup shows the async status, which also runs fc-list | grep powerline. The preview and the real render use the sync file-name check. So the screen can say "✓ Installed" while the preview above it is full of |.

Scope

This is not fixed in #61; the owner decided to document it for now. The other bugs from the same hunt are in #63. This one needs a decision on how detection should work, for example:

  • broaden the name patterns (NerdFont, NF, Powerline) and scan subfolders;
  • respect TERM_PROGRAM for terminals with built-in glyphs;
  • or make the fallback opt-in.

Generated by Claude Code

Activity

  1. axisrow commented on Oct 15, 2026

    @axisrow
    OwnerAuthor

    Moved upstream: sirmalloc#738, fix PR sirmalloc#739 (file-name patterns + recursive font-folder scan; built-in-glyph terminals like Ghostty/kitty/WezTerm are left as a follow-up there). The fork picks the fix up through the upstream merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions