TFT ILI9486 fonts

I know, many… hundreds, probably even thousands of posts about TFT’s have been published here on this forum about TFT’s. But sadly enough I can’t get this display ( ILI9486 ) to work properly. I have the display plugged onto an Arduino Mega. After trying several (combinations of) libraries, this is the one I got working albeit not completely. I use a “stripped” version of the UTFT_Demo_480x320 (C)2013 Henning Karlsen

Additional (extern) fonts generate :

no matching function for call to ‘UTFTGLUE::setFont(uint8_t [13684])’
What am I doing wrong ?
I have a copy of Grotesk24x28.c “all over the place” (main sketch folder, sketch folder, libraries folder)

I noticed other problems, but let’s start with this one… :slight_smile:

Anyone has a sollution ?
All info about this will be utmost appreciated.
Thanx in advance. Here’s the code :

#include <Adafruit_GFX.h>
#include <UTFTGLUE.h>
UTFTGLUE myGLCD(0x9486, A2, A1, A3, A4, A0);

// Declare which fonts we will be using
#if !defined(SmallFont)
extern uint8_t SmallFont[];    //.kbv GLUE defines as GFXFont ref
#endif
extern uint8_t Grotesk24x48[13684];
//////////////////////////////////////////////////////////////////
void setup()
{
  pinMode(A0, OUTPUT);       //.kbv mcufriend have RD on A0
  digitalWrite(A0, HIGH);

  myGLCD.InitLCD();
  myGLCD.setFont(Grotesk24x48);
}
//////////////////////////////////////////////////////////////////
void loop()
{
  myGLCD.clrScr();
  myGLCD.setColor(255, 0, 0);
  myGLCD.fillRect(0, 0, 479, 13);
  myGLCD.setColor(64, 64, 64);
  myGLCD.fillRect(0, 306, 479, 319);
  myGLCD.setColor(255, 255, 255);
  myGLCD.setBackColor(255, 0, 0);
  myGLCD.print("* Universal Color TFT Display Library *", CENTER, 1);
  myGLCD.setBackColor(64, 64, 64);
  myGLCD.setColor(255, 255, 0);
  myGLCD.print("<http://electronics.henningkarlsen.com>", CENTER, 307);
  myGLCD.setColor(0, 0, 255);
  myGLCD.drawRect(0, 14, 479, 305);
  delay(2000);
}

Your use of UTFTGLUE.h implies that you are actually using MCUFRIEND_kbv library with a Mcufriend Shield.

MCUFRIEND_kbv is an Adafruit_GFX style library. So it supports FreeFonts.

I strongly recommend that you use native GFX methods in any new programs.

Free Fonts are a lot more attractive than Grotesk24x48.

If you really want to use Grotesk24x48 I will create a Free Font version for you.

David.

WOW, David ! Thanks for your super fast answer !! (I just lifted my finger from the "Post" button, and there you are !!! 10110011011100 times thanks !)|

I just used that Grotesk font as an example. But thanks anyway for your offer to "translate" it... I'll take a raincheck on that ! :slight_smile:

So, then how should my init and setup look like ? Sorry to ask this, but I've tried soooo many combinations ... I'm sooo confused ... :slight_smile:

Hmmm ... been browsing around at Adafruit's, but couln't find a ILI9486 driver...

Run the "Font_simple.ino" from the Examples.

Experiment with other Fonts from your Adafruit_GFX installation.

David.

F I N A L Y !!! :slight_smile: :slight_smile: :slight_smile:

Thanks so much, David. IT WORKS !
And more : it worked RIGHT OUT THE BOX !
(After I deleted everything I had from GFX.h and MCUFRIEND.kbv.h and reinstalled these libraries.)
I experimented with fonts and yes : no problem, everything works just fine.
Quadrillion³ times thanks !

If you ever have questions about “general” electronics : lemme know !

OK. experimenting goes well :slight_smile: thanks !

but (of course... :confused: )

How do we know if a font is transparent or not ?
Is there a way to set transparancy ?

Utmost handy would be that we could find a complete, nice key word list + explanation for GFX and MCUFRIEND. Been googeling for hours ... I find bits here, bits there... kinda confusing ...

And last : I would love to use a kinda FULL 7 segment font (not only numbers), but it doesn't seem to be available ...

Anyone ???

tanx in advance !

This is a handy online GFX font creator Font Creator Now Creates Adafruit GFX Fonts - Squix - TechBlog

The how_to file in MCUFRIEND_kbv/extras/mcufriend_how_to.txt has links to Adafruit tutorials.

David.