Skip to content

Commit 30913a1

Browse files
#508 work around
1 parent 7e6cb04 commit 30913a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Arduino_GFX.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,8 +2012,13 @@ void Arduino_GFX::drawChar(int16_t x, int16_t y, unsigned char c,
20122012
xAdvance = pgm_read_byte(&glyph->xAdvance),
20132013
yAdvance = pgm_read_byte(&gfxFont->yAdvance),
20142014
baseline = yAdvance * 2 / 3; // TODO: baseline is an arbitrary currently, may be define in font file
2015+
#ifdef __AVR__
2016+
int8_t xo = pgm_read_byte(&glyph->xOffset),
2017+
yo = pgm_read_byte(&glyph->yOffset);
2018+
#else
20152019
int8_t xo = pgm_read_sbyte(&glyph->xOffset),
20162020
yo = pgm_read_sbyte(&glyph->yOffset);
2021+
#endif
20172022
uint8_t xx, yy, bits = 0, bit = 0;
20182023
int16_t xo16 = xo, yo16 = yo;
20192024

0 commit comments

Comments
 (0)