Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Powerline prompts render as smudged/banded segments: font-rasterized separators + unclamped fallback glyphs

オープン
#184 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@cunninghamcard-bit がすでに取り組んでいます。

2026年7月11日 から。

  • #185 @cunninghamcard-bit による — オープン

評価

難易度
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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/ghostty-web のほかの issue

coder/ghostty-web の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。