mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 07:18:11 +00:00
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:
@@ -8,7 +8,7 @@
|
||||
#define FIRMWARE_VER_CODE 11
|
||||
|
||||
#ifndef FIRMWARE_BUILD_DATE
|
||||
#define FIRMWARE_BUILD_DATE "12 May 2026"
|
||||
#define FIRMWARE_BUILD_DATE "19 May 2026"
|
||||
#endif
|
||||
|
||||
// Versioning: vX.Y = upstream base, plus.N = fork revision
|
||||
|
||||
@@ -80,6 +80,12 @@ public:
|
||||
while (str_len > 0 && getTextWidth(temp_str) > max_width - ellipsis_width) {
|
||||
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);
|
||||
|
||||
setCursor(x, y);
|
||||
|
||||
Reference in New Issue
Block a user