Powerline prompts render as smudged/banded segments: font-rasterized separators + unclamped fallback glyphs
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia da renderCellText e analizza come vengono usati cellWidth, fillStyle e le metriche dei glifi di fallback. Riproduci il prompt 2x, 13px JetBrains Mono e Symbols Nerd Font Mono, quindi verifica che U+E0B0-U+E0B7 vengano renderizzati con una geometria che copra la cella e che gli altri glifi siano limitati alla larghezza della propria cella, senza banding o sconfinamenti nelle celle adiacenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Symptom
Embedding ghostty-web (0.4.0) with a starship Powerline prompt (segment backgrounds, fading-arrow separators U+E0B0, rounded caps U+E0B4/E0B6, Nerd icons), the prompt renders as soft "watercolor" blobs with ragged edges and horizontal banding inside segments — while plain ASCII output stays crisp. Reproduced on a 2x display at 13px with JetBrains Mono + Symbols Nerd Font Mono.
Root causes (two, compounding)
1. Powerline separators are font-rasterized.
renderCellText draws U+E0B0-U+E0B7 via fillText like any glyph. Two physical problems:
- the diagonal edges keep anti-aliasing fringe on both sides, which visually smears against adjacent solid segment backgrounds;
- the glyph's ink height is smaller than the cell height (font ascent/descent box ≠ cell box), so the neighboring background bleeds through above/below every separator — with stacked "fading arrow" themes this shows as banding stripes.
This is why WezTerm and xterm.js (customGlyphs) both special-case these codepoints and draw them as exact vector geometry covering the cell box, bypassing the font entirely.
2. Oversized fallback glyphs are not clamped to their cells.
Cell metrics come from the primary font's M, but glyphs served by fallback fonts carry their own advance — e.g. Symbols Nerd Font Mono icons advance 1em (13px = 1.67 cells at a 7.8px cell). fillText never scales, so the ink bleeds into neighbor cells. Since rows repaint by background fill (no clearRect), the cursor-row repaint shaves that overhanging ink asymmetrically every blink — accumulating the ragged artifacts.
renderCellText already computes the cell budget (cellWidth = metrics.width * cell.width) but doesn't pass it to fillText, whose 4th argument (maxWidth) does exactly this clamping.
Fix
PR incoming that (a) draws U+E0B0-U+E0B7 as vector paths (solid triangles / angle outlines / half-circles) using the cell's fillStyle, and (b) passes cellWidth as fillText's maxWidth for everything else. Verified pixel-level against WezTerm rendering the same prompt.
- Lingua principale
- TypeScript
- Stelle
- 2.9k
- Fork
- 182
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/ghostty-web
-
buffer translateToString()/getChars() return '' for empty cells, collapsing cursor-positioned textAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
coder/ghostty-web#205 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
coder/ghostty-web#204 ·
-
Alt+<printable key> sends the bare key with no ESC prefix (readline/emacs/tmux meta bindings lost)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coder/ghostty-web#203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coder/ghostty-web#199 ·
-
Public buffer getChars and translateToString truncate multi-codepoint graphemesForse già presa @schickling-assistant l’ha presa 9 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
coder/ghostty-web#200 ·
Tutte le issue di coder/ghostty-web
Issue simili
-
bug cli service
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
create-element: same editorAlias silent-fallback bug as #201, not covered by that fixForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertagenerated-by-ai
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
umbraco/Umbraco-CMS-MCP-Editor#208 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagreeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
sidorares/react-x11-components#764 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
backnotprop/plannotator#1840 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
JoviDeCroock/pracht#432 ·
I maintainer di solito rispondono entro 1 giorno