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
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(client): the tab's process icon leaves the label, and stays on the cell path (UI/UX v3 N-3c) (#103)
Last of the three N-3 PRs. The Nerd Font glyph for the foreground process was
prepended to the label string, so after N-3b it was measured and drawn as part
of a chrome run. `rasterize_chrome_char` boxes a glyph to its advance without
cropping to ink, and Nerd Font icons commonly overhang, so it drew the icon into
a box that could cut it.
It is now drawn beside the label, in a slot the tab reserves for it through
`tab_width`'s `icon_w` parameter — the one N-3a shipped and tested.
The spec's D3 said to draw it "through the icon path, which crops". Checking
that before building on it: `icons.rs` documents that the bundled Fluent
subset's codepoints "live in the Private Use Area, which overlaps the Nerd Font
range `tab_icons.rs` uses", and that they are only safe to draw through
`FontRole::Icon` precisely so the two sets cannot resolve against each other.
Asking the icon path for a process glyph would have silently returned a Fluent
icon at that codepoint — a wrong glyph rather than a clipped one.
So the icon stays on the cell path, which is where it has always come from: it
resolves against the user's terminal font and boxes a glyph to a whole cell
rather than to its advance, which is the clipping fix. D3 is corrected in the
spec with the evidence.
A test pins that the process glyph is not routed through the chrome icon path.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
0 commit comments