forked from Bodmer/TFT_eSPI
Fixed TFT_eSPI::fontHeight() with autobahn
This commit is contained in:
12
TFT_eSPI.cpp
12
TFT_eSPI.cpp
@@ -3020,16 +3020,20 @@ uint16_t TFT_eSPI::fontsLoaded(void)
|
|||||||
***************************************************************************************/
|
***************************************************************************************/
|
||||||
int16_t TFT_eSPI::fontHeight(int16_t font)
|
int16_t TFT_eSPI::fontHeight(int16_t font)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_TFT_IS_AUTOBAHN
|
||||||
|
if (font == 4)
|
||||||
|
font = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SMOOTH_FONT
|
#ifdef SMOOTH_FONT
|
||||||
if(fontLoaded) return gFont.yAdvance;
|
if(fontLoaded) return gFont.yAdvance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOAD_GFXFF
|
#ifdef LOAD_GFXFF
|
||||||
if (font==1) {
|
if (font == 1)
|
||||||
if(gfxFont) { // New font
|
if (gfxFont) // New font
|
||||||
return pgm_read_byte(&gfxFont->yAdvance) * textsize;
|
return pgm_read_byte(&gfxFont->yAdvance) * textsize;
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return pgm_read_byte( &fontdata[font].height ) * textsize;
|
return pgm_read_byte( &fontdata[font].height ) * textsize;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user