Long strings can overflow a fixed label. The original project used a SubUTF8String helper to truncate by characters rather than raw bytes:
1 | function truncateLabel(text, maxCharacters) |
string.len() counts bytes, so it should not be used by itself as a character count for UTF-8 text. For proportional fonts, character count is only an approximation; measuring rendered width and truncating until it fits produces a more accurate UI.