mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-05 05:34:43 +02:00
Fix issue #60
Do not adjust x datum for characters that have a positive offset.
This commit is contained in:
@@ -3409,8 +3409,8 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font)
|
|||||||
GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]);
|
GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]);
|
||||||
xo = pgm_read_byte(&glyph->xOffset) * textsize;
|
xo = pgm_read_byte(&glyph->xOffset) * textsize;
|
||||||
// Adjust for negative xOffset
|
// Adjust for negative xOffset
|
||||||
//if (xo < 0)
|
if (xo > 0) xo = 0;
|
||||||
cwidth -= xo;
|
else cwidth -= xo;
|
||||||
// Add 1 pixel of padding all round
|
// Add 1 pixel of padding all round
|
||||||
//cheight +=2;
|
//cheight +=2;
|
||||||
//fillRect(poX+xo-1, poY - 1 - glyph_ab * textsize, cwidth+2, cheight, textbgcolor);
|
//fillRect(poX+xo-1, poY - 1 - glyph_ab * textsize, cwidth+2, cheight, textbgcolor);
|
||||||
|
Reference in New Issue
Block a user