Powerline prompts render as smudged/banded segments: font-rasterized separators + unclamped fallback glyphs
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
renderCellText から始めて、cellWidth、fillStyle、フォールバックグリフのメトリクスがどのように使用されているかを調べます。2x、13px JetBrains Mono および Symbols Nerd Font Mono のプロンプトを再現し、その後、U+E0B0-U+E0B7 がセルを覆うジオメトリでレンダリングされ、その他のグリフがバンディングや隣接セルへのはみ出しなしにセル幅内に制限されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 3k
- フォーク
- 183
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/ghostty-web のほかの issue
-
buffer translateToString()/getChars() return '' for empty cells, collapsing cursor-positioned textオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
coder/ghostty-web#205 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
coder/ghostty-web#204 ·
-
Alt+<printable key> sends the bare key with no ESC prefix (readline/emacs/tmux meta bindings lost)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
coder/ghostty-web#203 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
coder/ghostty-web#199 ·
-
Public buffer getChars and translateToString truncate multi-codepoint graphemes対応中かも @schickling-assistant が 16 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
coder/ghostty-web#200 ·
coder/ghostty-web の issue をすべて見る
似ている issue
-
area:security documentation effort:S priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
app:web meta:ops
難易度 2/5 半日 初心者へのやさしさ 78/100
osu-tournament-rating/otr#1113 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
typegoose/mongodb-memory-server#1040 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100