Remove 1 pixel border on FreeFont background

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

No files matched your search

+3 -2
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