Skip to content

fix: render Unicode block elements without glyph seams - #212

Open
davidbrochart wants to merge 1 commit into
coder:mainfrom
davidbrochart:fix/pixel-aligned-block-elements
Open

davidbrochart wants to merge 1 commit into
coder:mainfrom
davidbrochart:fix/pixel-aligned-block-elements

Conversation

@davidbrochart

Copy link
Copy Markdown

Adjacent Unicode block glyphs can show seams when drawn with fillText(), depending on font metrics and display scaling. This is visible in the solid blue parts of the LazyVim dashboard logo, even after aligning cell backgrounds.

Render solid Unicode Block Elements as geometric rectangles with shared physical-pixel boundaries: full blocks, fractional horizontal/vertical blocks, and quadrant combinations. Preserve the existing foreground selection, inverse, faint, cursor-color, and invisible handling. Ordinary text, grapheme clusters, shaded blocks, and box-drawing glyphs retain font rendering.

This PR is independent of #211: that change fixes cell backgrounds; this fixes block-character foregrounds. It does not attempt to fix seams in box-drawing font glyphs.

Validation:

  • 27 new tests cover block and quadrant geometry, shared edges at device-pixel ratios 1, 1.1, 1.25, 1.5, and 2, colors, and font fallback.
  • A separate real-canvas pixel check verifies uniform foreground coverage across adjacent full blocks at all five scales.
  • Full suite: 399 passed, 0 failed.
  • Formatting, lint, TypeScript checks, and full WASM/JavaScript build pass.

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