Skip to content

Nickez/bb02 lvgl font#1973

Open
NickeZ wants to merge 5 commits into
BitBoxSwiss:masterfrom
NickeZ:nickez/bb02-lvgl-font
Open

Nickez/bb02 lvgl font#1973
NickeZ wants to merge 5 commits into
BitBoxSwiss:masterfrom
NickeZ:nickez/bb02-lvgl-font

Conversation

@NickeZ
Copy link
Copy Markdown
Collaborator

@NickeZ NickeZ commented May 13, 2026

It should look exactly the same, I even applied our manual fixes to the 9px Arial. You can test unicode characters in message signing. For example, try signing Zürich.

I'm aware that we potentially are truncating utf-8 strings on invalid boundaries. Should an utf-8 aware boundary truncation method be added in this PR, or a followup PR? I'll add a fix scoped only to message signing.

This PR adds 249 glyphs to the arial fonts, increases number of glyphs from 94 to 343. For that we pay about 10kB to the firmware size.

I propose that we fix the truncation issues by migrating the label component to rust: #1974

@NickeZ NickeZ requested a review from benma May 13, 2026 21:41
@NickeZ NickeZ force-pushed the nickez/bb02-lvgl-font branch from de01420 to 5c0fd4a Compare May 13, 2026 22:00
NickeZ added 2 commits May 18, 2026 11:58
Add the FreeType-based LVGL font conversion tool and document how BB02
fonts are generated from it.
Add the generated LVGL font data and small uGUI compatibility wrappers
used by the BB02 UI migration.
@NickeZ NickeZ force-pushed the nickez/bb02-lvgl-font branch 2 times, most recently from 894389d to 1d316e2 Compare May 18, 2026 11:17
NickeZ added 3 commits May 18, 2026 13:34
Wire the new LVGL font assets into the firmware, bootloader, simulator
bindings, and Rust UI font types, then remove the old uGUI font files.
Use the BB02 default font coverage to decide whether signed messages can
be shown as text, and add tests for UTF-8 display and hex fallback.
Pre-truncate displayable message signing text in Rust so the C label
component receives a body that already fits within MAX_LABEL_SIZE. This
keeps truncation on UTF-8 character boundaries and avoids relying on the
label's byte-level fallback truncation for this path.
@NickeZ NickeZ force-pushed the nickez/bb02-lvgl-font branch from 1d316e2 to eab5042 Compare May 18, 2026 11:34
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