mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-07-31 19:24:46 +02:00
Fill smooth font background if padding is set.
This commit is contained in:
@@ -5009,10 +5009,15 @@ int16_t TFT_eSPI::drawString(const char *string, int32_t poX, int32_t poY, uint8
|
|||||||
if(fontLoaded) {
|
if(fontLoaded) {
|
||||||
setCursor(poX, poY);
|
setCursor(poX, poY);
|
||||||
|
|
||||||
|
bool fillbg = _fillbg;
|
||||||
|
// If padding is requested then fill the text background
|
||||||
|
if (padX && !_fillbg) _fillbg = true;
|
||||||
|
|
||||||
while (n < len) {
|
while (n < len) {
|
||||||
uint16_t uniCode = decodeUTF8((uint8_t*)string, &n, len - n);
|
uint16_t uniCode = decodeUTF8((uint8_t*)string, &n, len - n);
|
||||||
drawGlyph(uniCode);
|
drawGlyph(uniCode);
|
||||||
}
|
}
|
||||||
|
_fillbg = fillbg; // restore state
|
||||||
sumX += cwidth;
|
sumX += cwidth;
|
||||||
//fontFile.close();
|
//fontFile.close();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user