chore: bump build date to 19 May 2026; fix UTF-8 ellipsis truncation

Fix drawTextEllipsized to strip orphaned UTF-8 leading bytes after
byte-at-a-time trimming, preventing an invisible 6px gap before "..."
when truncating non-ASCII names.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-19 10:25:25 +02:00
co-authored by Claude Sonnet 4.6
parent 0b3477daeb
commit 4d163cda49
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
#define FIRMWARE_VER_CODE 11 #define FIRMWARE_VER_CODE 11
#ifndef FIRMWARE_BUILD_DATE #ifndef FIRMWARE_BUILD_DATE
#define FIRMWARE_BUILD_DATE "12 May 2026" #define FIRMWARE_BUILD_DATE "19 May 2026"
#endif #endif
// Versioning: vX.Y = upstream base, plus.N = fork revision // Versioning: vX.Y = upstream base, plus.N = fork revision
+6
View File
@@ -80,6 +80,12 @@ public:
while (str_len > 0 && getTextWidth(temp_str) > max_width - ellipsis_width) { while (str_len > 0 && getTextWidth(temp_str) > max_width - ellipsis_width) {
temp_str[--str_len] = 0; temp_str[--str_len] = 0;
} }
// Strip any orphaned UTF-8 leading byte left by the byte-at-a-time trimming above.
// A leading byte (0xC0-0xFF, high two bits = 11) with no following continuation
// byte renders as an invisible 6px advance, leaving a gap before the ellipsis.
while (str_len > 0 && ((uint8_t)temp_str[str_len - 1] & 0xC0) == 0xC0) {
temp_str[--str_len] = 0;
}
strcat(temp_str, ellipsis); strcat(temp_str, ellipsis);
setCursor(x, y); setCursor(x, y);