Update ex25 for Teensy fonts
#include "GUIslice_ex.h"
#include "GUIslice_drv.h"
-#include <Adafruit_GFX.h>
+
+// Determine whether to load Adafruit-GFX extra fonts or Teensy fonts
+#if defined(DRV_DISP_ADAGFX_ILI9341_T3)
+ #define FONTS_T3
+#endif
// Note that font files are located within the Adafruit-GFX library folder:
//<Fonts !Start!>
+#if defined(FONTS_T3)
+ #include <font_Arial.h>
+#else
+ #include <Adafruit_GFX.h>
#include "Fonts/FreeSans9pt7b.h"
+#endif
//<Fonts !End!>
// ------------------------------------------------
@@ -226,8 +235,13 @@ void setup()
// Load Fonts
// ------------------------------------------------
//<Load_Fonts !Start!>
+#if defined(FONTS_T3)
+ if (!gslc_FontAdd(&m_gui, E_FONT_SANS1, GSLC_FONTREF_PTR, &Arial_12, 1)) { return; }
+ if (!gslc_FontAdd(&m_gui, E_FONT_TXT2, GSLC_FONTREF_PTR, NULL, 2)) { return; }
+#else
if (!gslc_FontAdd(&m_gui, E_FONT_SANS1, GSLC_FONTREF_PTR, &FreeSans9pt7b, 1)) { return; }
if (!gslc_FontAdd(&m_gui, E_FONT_TXT2, GSLC_FONTREF_PTR, NULL, 2)) { return; }
+#endif
//<Load_Fonts !End!>
// ------------------------------------------------
@@ -269,4 +283,3 @@ void loop()
gslc_Update(&m_gui);
}
-
