diff --git a/radio/src/fonts/sqt5/font_pt_04x06.png b/radio/src/fonts/sqt5/font_pt_04x06.png index b3bc84800..0058383f0 100644 Binary files a/radio/src/fonts/sqt5/font_pt_04x06.png and b/radio/src/fonts/sqt5/font_pt_04x06.png differ diff --git a/radio/src/fonts/std/font_pt_04x06.png b/radio/src/fonts/std/font_pt_04x06.png index 7b856876e..0058383f0 100644 Binary files a/radio/src/fonts/std/font_pt_04x06.png and b/radio/src/fonts/std/font_pt_04x06.png differ diff --git a/radio/src/gui/128x64/lcd.cpp b/radio/src/gui/128x64/lcd.cpp index a8b40a141..47c25b1a5 100644 --- a/radio/src/gui/128x64/lcd.cpp +++ b/radio/src/gui/128x64/lcd.cpp @@ -262,6 +262,7 @@ uint8_t getTextWidth(const char * s, uint8_t len, LcdFlags flags) while (len--) { #if !defined(BOOT) unsigned char c = map_utf8_char(s, len); + if (c >= 0x95 && FONTSIZE(flags)) c -=21; #else unsigned char c = *s; #endif @@ -305,6 +306,7 @@ void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlag else if (c >= 0x20) { // UTF8 detection c = map_utf8_char(s, len); + if (c >= 0x95 && fontsize) c -=21; if (!c) break; lcdDrawChar(x, y, c, flags); diff --git a/radio/src/gui/212x64/lcd.cpp b/radio/src/gui/212x64/lcd.cpp index 0665479a9..318c10358 100644 --- a/radio/src/gui/212x64/lcd.cpp +++ b/radio/src/gui/212x64/lcd.cpp @@ -309,6 +309,7 @@ void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlag #if !defined(BOOT) // UTF8 detection c = map_utf8_char(s, len); + if (c >= 0x95 && FONTSIZE(flags)) c -=21; if (!c) break; if (c == 46 && FONTSIZE(flags) == TINSIZE) { // '.' handling diff --git a/radio/src/gui/common/stdlcd/utf8.cpp b/radio/src/gui/common/stdlcd/utf8.cpp index 5ac1fdd30..e7dcb627b 100644 --- a/radio/src/gui/common/stdlcd/utf8.cpp +++ b/radio/src/gui/common/stdlcd/utf8.cpp @@ -81,6 +81,13 @@ static wchar_t _utf8_lut[] = { L'Ñ', L'ñ', L'Á', L'á', L'É', L'é', L'Í', L'í', L'Ó', L'ó', L'ú', }; +#elif defined(TRANSLATIONS_PT) +static wchar_t _utf8_lut[] = { + L'Á', L'á', L'Â', L'â', L'Ã', L'ã', L'À', + L'à', L'Ç', L'ç', L'É', L'é', L'Ê', L'ê', + L'Í', L'í', L'Ó', L'ó', L'Ô', L'ô', L'Õ', + L'õ', L'Ú', L'ú', +}; #elif defined(TRANSLATIONS_FI) static wchar_t _utf8_lut[] = { L'å', L'ä', L'ö', L'Å', L'Ä', L'Ö',