Skip to content

fix(render): clip symbols to terminal cells - #192

Closed
cpendery (cpendery) wants to merge 3 commits into
mainfrom
fix/nerd-font-grid-alignment
Closed

fix(render): clip symbols to terminal cells#192
cpendery (cpendery) wants to merge 3 commits into
mainfrom
fix/nerd-font-grid-alignment

Conversation

@cpendery

@cpendery cpendery (cpendery) commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • snap Powerline transforms to the same integer pixel bounds as terminal backgrounds and cursors
  • clip private-use and block-element outlines to their owning grid cell with a reusable renderer mask
  • fit semantic full-cell and shade glyphs to all four grid edges, matching browser cell geometry while preserving title font metrics
  • cover Powerline, Nerd Font, full-block, shade, and window-title glyphs at 1.25x and 2x raster scales
  • update the deterministic Nerd Font GIF/PNG render snapshots

Validation

  • cargo clippy -p tui-test-rs --all-targets --all-features -- -D warnings
  • cargo clippy -p tui-test-rs --all-targets --no-default-features -- -D warnings
  • cargo test -p tui-test-rs --all-features -- --test-threads=1
  • bash scripts/regenerate-static-media.sh (all generated static timelines were pixel-identical, so timing-only churn was discarded)

Before and after

The images are 4x nearest-neighbor crops of the same deterministic snapshot. On main, the 鈻堚枔鈻掆枒 row begins five source pixels inside the Powerline row and antialiased symbol pixels can escape neighboring cells. Afterward, symbols stop at the shared snapped edge, and 鈻堚枔鈻掆枒 each fill the complete cell like the web rendering. The regression measured 200 gray bleed pixels before and 0 after and requires every semantic full-cell glyph to touch all four boundaries.

Before After
Before: block and shade glyphs bleed into the Powerline row After: symbols clipped and fitted to their snapped terminal cells

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant