render: draw shade blocks and powerline separators as exact shapes - #4
Open
r-near wants to merge 1 commit into
Open
render: draw shade blocks and powerline separators as exact shapes#4r-near wants to merge 1 commit into
r-near wants to merge 1 commit into
Conversation
r-near
marked this pull request as ready for review
July 17, 2026 21:54
Two glyph categories were rendered via the font in `graphic()`'s fallback, which produces artifacts at high resolution: - Shade blocks (░ ▒ ▓) rendered as the font's literal dither-dot patterns. In gradients (e.g. a powerline fade-in) these read as visible dots rather than a smooth ramp. Draw them as the foreground color at graduated opacity (0.25 / 0.5 / 0.75) so they blend into a smooth gradient. - Powerline separators (U+E0B0–E0B7) rendered from the font don't fill the cell edge-to-edge, leaving seams between segments. Draw the filled triangles/half-discs and their line variants as exact cell-filling SVG shapes so adjacent segments meet cleanly. Updates the existing shade-block test (which asserted the old font-glyph behavior) to expect graduated opacity, and adds a powerline-separator test.
r-near
force-pushed
the
fix/smooth-shade-and-powerline-separators
branch
from
July 20, 2026 05:03
5109e3c to
c8e6e6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shade blocks (
░▒▓) and the powerline separators (U+E0B0toE0B7) get drawn straight from the font, which looks rough at high pixel ratios: the shades come out as literal dither dots (really obvious in a powerline fade-in), and the separators don't fill the cell, so there are little seams between segments.This draws both as exact shapes in
graphic()instead, the same way the block and box-drawing chars already are. Shades become the fg color at 25/50/75% opacity, and the separators become filled triangles and half-discs that fill the cell.Before
After