Remove 1 pixel border on FreeFont background

This caused problems when the font is rendered at screen edges.
This commit is contained in:
Bodmer
2017-06-16 19:05:12 +01:00
parent 49340b3952
commit cbc8d209a3
3 changed files with 5 additions and 4 deletions

View File

@@ -3241,8 +3241,9 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font)
//if (xo < 0)
cwidth -= xo;
// Add 1 pixel of padding all round
cheight +=2;
fillRect(poX+xo-1, poY - 1 - glyph_ab * textsize, cwidth+2, cheight, textbgcolor);
//cheight +=2;
//fillRect(poX+xo-1, poY - 1 - glyph_ab * textsize, cwidth+2, cheight, textbgcolor);
fillRect(poX+xo, poY - glyph_ab * textsize, cwidth, cheight, textbgcolor);
padding -=100;
}
#endif

View File

@@ -1,6 +1,6 @@
{
"name": "TFT_eSPI",
"version": "0.16.12",
"version": "0.16.13",
"keywords": "TFT, ESP8266, NodeMCU, ESP32, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486",
"description": "A TFT SPI graphics library for ESP8266",
"repository":

View File

@@ -1,5 +1,5 @@
name=TFT_eSPI
version=0.16.12
version=0.16.13
author=Bodmer
maintainer=Bodmer
sentence=A fast TFT library for ESP8266 processors and the Arduino IDE