Merge pull request #2 from 0xFEEDC0DE64/string-fixes

This commit is contained in:
CommanderRedYT authored and GitHub committed 2022-12-16 14:50:55 +01:00
commit 0fc74055a2
1 file changed
+7
+7
View File
@@ -2264,6 +2264,13 @@ int16_t TFT_eSPI::textWidth(std::string_view string, uint8_t font)
int32_t str_width = 0;
uint16_t uniCode = 0;
#ifdef CONFIG_TFT_IS_AUTOBAHN
if (font == 1 || (gfxFont != &din1451alt10pt8b && font == 4))
{
str_width = 1;
}
#endif
auto iter = std::begin(string);
#ifdef SMOOTH_FONT