mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 23:38:12 +00:00
The text preview was the last part of the keyboard still working in bytes rather than codepoints. cpl is how many characters physically fit on a line, so dividing byte offsets by it counted every 2-byte Cyrillic/Greek/ accented character as two: lines held half the text they had room for, and a break could land inside a codepoint. Both display drivers are permanently single-font, so translateUTF8ToBlocks() passes UTF-8 straight through -- the truncated sequence reached print() and drew as garbage on both sides of the break. Line boundaries now walk the buffer with the same kbUtf8*() helpers insertion/backspace/T9 already use, and the per-line buffers are sized for a full line of 2-byte characters. Caps-lock also gets an underline on the shift key: it sets caps too, so the highlight alone made a one-shot Shift and a held lock indistinguishable despite capitalising one letter vs. every following one. Drops UITask::applyFont() -- setSingleFont() is a no-op on both drivers since they were pinned to misc-fixed, so it did nothing, and use_lemon_font has had no Settings row for a while. The pref itself stays: it's part of the on-disk layout. Retires the matching stale rationale on scriptHint(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>