render: fit multi-codepoint clusters to their cells #17
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#10 shrinks a single-char glyph whose advance overruns its cells, but clusters take
composite_cluster→ensure_glyph_id(crates/felis-render-wgpu/src/glyphs.rs) andpush_cluster_cell(instances.rs~606–664), which rasterize at full size and place glyphs by raw pen advance. kitty and WezTerm fit these; felis and Alacritty overlap the next character.Repros:
printf '※́X': one-cell cluster, drawn ~2.5 cells wide overX. Same with※︎,①́.printf '🇦🇦X'(no flag glyph),🐈🦀X(non-RGI ZWJ),😀🏻X,#️⃣X(keycap not ligated by swash): the grid clamps to 2 cells, the shaper returns two full-width glyphs (~3.4 cells).\e[999C❤️,❤X\e[D️(see #12).Fix direction: apply the same advance-vs-footprint fit per cluster, using the cell's actual footprint (its Spacer, or 1 when the widen was refused). Also:
docs/explanation/rendering/text-shaping.md"Prior art" describes a ligature-run check that glyph advances matchn_graphemes × cell_widthwith a per-cell fallback;apply_shaped_runhas no such check. Either add it or correct the doc.Depends on #10.
natsukium referenced this issue2026-10-21 23:34:23 +09:00