Skip to content

render: draw shade blocks and powerline separators as exact shapes - #4

Open
r-near wants to merge 1 commit into
anomalyco:mainfrom
r-near:fix/smooth-shade-and-powerline-separators
Open

render: draw shade blocks and powerline separators as exact shapes#4
r-near wants to merge 1 commit into
anomalyco:mainfrom
r-near:fix/smooth-shade-and-powerline-separators

Conversation

@r-near

@r-near r-near commented Jul 17, 2026

Copy link
Copy Markdown

Shade blocks (░▒▓) and the powerline separators (U+E0B0 to E0B7) 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

upstream-before

After

upstream-after

@r-near
r-near marked this pull request as ready for review July 17, 2026 21:54
Copilot AI review requested due to automatic review settings July 17, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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
r-near force-pushed the fix/smooth-shade-and-powerline-separators branch from 5109e3c to c8e6e6d Compare July 20, 2026 05:03
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.

2 participants