Skip to content

fix(font): Prevent VLW spaces from erasing previous rows. - #279

Open
hlym123 wants to merge 1 commit into
m5stack:developfrom
hlym123:fix/vlw-space-background
Open

fix(font): Prevent VLW spaces from erasing previous rows.#279
hlym123 wants to merge 1 commit into
m5stack:developfrom
hlym123:fix/vlw-space-background

Conversation

@hlym123

@hlym123 hlym123 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Some VLW exporters encode a blank space bitmap with offsets outside the text line. Rendering that bitmap can fill the background above the current line and erase previously drawn text.

Treat spaces as advance-only glyphs while retaining the xAdvance stored in the font. Keep the guessed advance for fonts without a space glyph.

Validate 54 space cases across three fonts with ASan/UBSan and confirm that 294 non-space glyph renderings remain unchanged.

Some VLW exporters encode a blank space bitmap with offsets outside the text line. Rendering that bitmap can fill the background above the current line and erase previously drawn text.

Treat spaces as advance-only glyphs while retaining the xAdvance stored in the font. Keep the guessed advance for fonts without a space glyph.

Validate 54 space cases across three fonts with ASan/UBSan and confirm that 294 non-space glyph renderings remain unchanged.

Signed-off-by: hlym123 <lwylwt@qq.com>
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