Skip to content

fix: make layer compositor UTF-8 aware#127

Merged
meszmate merged 2 commits into
mainfrom
fix/layer-compositor-utf8
Jul 24, 2026
Merged

fix: make layer compositor UTF-8 aware#127
meszmate merged 2 commits into
mainfrom
fix/layer-compositor-utf8

Conversation

@meszmate

Copy link
Copy Markdown
Owner

Fixes #124

The compositor treated layer content as bytes, one grid cell per byte. Multibyte characters like the rounded border glyphs got split across three cells, and with a color active each fragment was wrapped in its own escape codes, so terminals showed replacement chars and the borders came out three times too wide.

Cells now hold the full UTF-8 sequence of a character and painting advances by display width, so wide chars cover two columns. Added tests for plain and styled multibyte content, overlay alignment and wide chars.

@meszmate
meszmate merged commit 2613952 into main Jul 24, 2026
9 checks passed
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.

Layers example: border does not render properly

1 participant