diff --git a/radio/src/gui/colorlcd/fonts.cpp b/radio/src/gui/colorlcd/fonts.cpp index 12f603239..8468a74aa 100644 --- a/radio/src/gui/colorlcd/fonts.cpp +++ b/radio/src/gui/colorlcd/fonts.cpp @@ -29,6 +29,8 @@ const unsigned char font_xxs[] = { }; #if LCD_H > 272 + +#if defined(BOOT) const uint16_t font_std_en_specs[] = { #include "font_17en.specs" }; @@ -36,6 +38,7 @@ const uint16_t font_std_en_specs[] = { const unsigned char font_std_en[] = { #include "font_17en.lbm" }; +#endif const uint16_t font_xs_specs[] = { #include "font_15.specs" @@ -60,7 +63,10 @@ const uint16_t font_bold_specs[] = { const unsigned char font_bold[] = { #include "font_bold17.lbm" }; -#else + +#else // LCD_H <= 272 + +#if defined(BOOT) const uint16_t font_std_en_specs[] = { #include "font_16en.specs" }; @@ -68,6 +74,7 @@ const uint16_t font_std_en_specs[] = { const unsigned char font_std_en[] = { #include "font_16en.lbm" }; +#endif const uint16_t font_xs_specs[] = { #include "font_13.specs" @@ -92,6 +99,7 @@ const uint16_t font_bold_specs[] = { const unsigned char font_bold[] = { #include "font_bold16.lbm" }; + #endif // LCD_H > 272 const uint16_t font_l_specs[] = { diff --git a/radio/src/gui/colorlcd/lcd.cpp b/radio/src/gui/colorlcd/lcd.cpp index 6826b0a00..9156c2690 100644 --- a/radio/src/gui/colorlcd/lcd.cpp +++ b/radio/src/gui/colorlcd/lcd.cpp @@ -66,7 +66,7 @@ int getTextWidth(const char * s, int len, LcdFlags flags) c += CJK_FIRST_LETTER_INDEX; result += getFontPatternWidth(specs, c) + 1; } - else if ((c >= 0x20) && (c < fontCharactersTable[FONT_INDEX(flags)] + 0x20)) { // debug + else if ((c >= 0x20u) && (c < fontCharactersTable[FONT_INDEX(flags)] + 0x20u)) { result += getCharWidth(c, specs); } else {