Switching back to the default font after using Free Fonts

I first display a splash screen using free fonts:
tft.setFreeFont(&FreeSansBoldOblique24pt7b);
tft.drawString(“HELLO”,50,100);
delay(1000);

I then wish to go back to the “default” font that the rest of my sketch is set up to use:
tft.setTextSize(2);
tft.drawString(“ON”,296,221);

Is keeps using the FreeFonts.
How do I unload the FreeFont or switch back to the default font?

Hi @jake333,

Do this instead:

tft.setFreeFont(NULL);
tft.setTextSize(2);
tft.drawString(“ON”,296,221);

This will switch back to the default font.

Hope it helps.

Best Regards,
Lakshantha

1 Like