Convert UTFT to GFX fonts

Hi, I am using the Adafruit 3.2" TFT Lcd screen with their GFX font library.

I want to use the SmallFont and the BigFont from the UTFT library (attached).

Can this .c file be converted in a .h file format so it can be included as:
#include <Fonts/SmallFontxxpt7b.h>

Many thanks in advance

DefaultFonts.c (34.6 KB)

I am amazed that anyone would want to use the unattractive SmallFont and BigFont !!

MCUFRIEND_kbv library has always provided the UTFT fonts in "FreeFont" format.

David.

FreeDefaultFonts.h (29.1 KB)

Hi David,
Thank you for your reply. I am trying to find a close match to the BigFont numbers.
Referring to the attached test code, could you advise me how to use the FreeBigFonts?
Kind regards

graphicstest2.ino (2.87 KB)

You appear to have a Mcufriend style pinout.
Life is much simpler when you post a link to the actual Display shield that you have bought.

You can probably just run MCUFRIEND_kbv library examples straight out of the box.
Which is better than me guessing.

Here goes:

...
#include <Fonts/FreeMonoBold24pt7b.h> 
#include <FreeDefaultFonts.h>  //contains FreeSmallFont, FreeBigFont and FreeSevenSegmentFont
...
     tft.setFont(&FreeBigFont);
     tft.println("3,500 kHz");
     tft.setFont(&FreeMonoBold24pt7b);
     tft.println("3,500 kHz");

I am amazed by how few Posters link to their specific hardware. It takes you 10 seconds but removes all ambiguity in one go.

David.

Hi David,
Thank you for your assistance, these fonts compile now!

I am trying to find a "GFX" equivalent to the big font in the attached 3.2" TFT Lcd display on a Sainsmart 3.2" TFT Lcd touch panel. (SainSmart Mega2560 R3+Adaptor Shield+3.2 TFT LCD Touch Panel For Arduino Atmel Atmega AVR 16AU ATmega8U2 – SainSmart.com).
I can write to this display but cant get the touchscreen to work.

So I bought the Adafruit 3.5" TFT 320x480 + touchscreen. (3.5 TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket [HXD8357D] : ID 2050 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits). I can write to this screen and have the touchscreen working but am still looking for the big fonts.

It seems that the author of the big fonts modified the original UTFT fonts. I have the .c file and so my original question was is it possible to adapt them to a GFX type?

BigFont.jpg

BigFont.jpg

DefaultFonts.c (34.6 KB)

I suggest that you look at the large range of fonts available from U8g2lib
I don't think that any of the FreeFonts that come with Adafruit_GFX match your JPG

And UTFT's BigFont certainly does not match the 7.022.79
But the SPLIT looks pretty horrible. That looks like UTFT BigFont
The UTFT website has a whole range of ugly fonts that you can choose.

It is your project. You make the decisions for which Fonts to use.
There are many designed for small LCD displays. And many designed for your PC monitor. If you specify which font you want to use, we can probably tell you where to find a ready-made version for your GFX or how to create a compatible FreeFont yourself.

If you specify which UTFT font you want, I can create a FreeFont for you.

Which display do you want to use?
The Sainmart one says 240x320 SSD1289. I doubt if it really is SSD1289. But it is definitely 16-bit Parallel
The Adafruit one is 320x480 HX8357D. You can use SPI or Parallel

The Sainsmart has an SPI Touch Controller chip
The Adafruit has bare resistive screen.

Please make a nice cup of tea. Think about what you want.

Oh. Your links need editing you have extraneous right-parenthesis and period in both URLs.

David.