mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2024-09-21 10:27:11 +00:00
Fix #1656
This commit is contained in:
parent
92d51413aa
commit
4fae4fa6cb
@ -5191,7 +5191,7 @@ void TFT_eSPI::setFreeFont(const GFXfont *f)
|
|||||||
uint16_t numChars = pgm_read_word(&gfxFont->last) - pgm_read_word(&gfxFont->first);
|
uint16_t numChars = pgm_read_word(&gfxFont->last) - pgm_read_word(&gfxFont->first);
|
||||||
|
|
||||||
// Find the biggest above and below baseline offsets
|
// Find the biggest above and below baseline offsets
|
||||||
for (uint8_t c = 0; c < numChars; c++) {
|
for (uint16_t c = 0; c < numChars; c++) {
|
||||||
GFXglyph *glyph1 = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c]);
|
GFXglyph *glyph1 = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c]);
|
||||||
int8_t ab = -pgm_read_byte(&glyph1->yOffset);
|
int8_t ab = -pgm_read_byte(&glyph1->yOffset);
|
||||||
if (ab > glyph_ab) glyph_ab = ab;
|
if (ab > glyph_ab) glyph_ab = ab;
|
||||||
|
Loading…
Reference in New Issue
Block a user