ILI9341_t3 Library Fonts

Status
Not open for further replies.

Cosford

Well-known member
Hi guys,

Working with this library and a ILI9340 based touchscreen which is working great.
Without going too in-depth into the source code, I understand that the library only natively supports the single 5 x 7 font, and it seems the setTextSize() function just scales that font up. I'd like to use a different font with the library; specifically a font probably around the size of 10x14 ish. Where can I obtain other fonts formatted correctly for use with the library? I do not necessarily need to be able to use more than one font in the same sketch, but I'd like to replace the existing 5 x 7 with a higher size font. How would I go about doing this?

My <quick> attempt thus far has just resulted in a lot of pixels being drawn randomly around the areas where I expect the text to be (although I can't say I've tried too hard. I figured I'd check here to see whether anyone had documented the correct method for doing this before spending lots of time working it out).

Thanks in advance.
 
Thanks for the clarification.
I will spend some time over the next couple of weeks working on it.
 
Hi guys,
I have been messing around with using the Adafruit_mfGFX library with the ili9341_t3, it's not a bad compromise as a way of getting multiple fonts and font sizes and still benefiting from the amazing drawing speed of this library. Here are speeds from the graphicstest example:

ILI9341 Test!
Display Power Mode: 0xEE
MADCTL Mode: 0x24
Pixel Format: 0x2
Image Format: 0x10
Self Diagnostic: 0xE0
Benchmark Time (microseconds)
Screen fill 280943
Text 22472
Lines 73189
Horiz/Vert Lines 23069
Rectangles (outline) 14631
Rectangles (filled) 584218
Circles (filled) 92440
Circles (outline) 77061
Triangles (outline) 17751
Triangles (filled) 195518
Rounded rects (outline) 34512
Rounded rects (filled) 639130
Done!

When changing the font to a custom 20px font the text benchmark goes to 31265 - not bad! For reference the same font used with the Adafruit_ili9341 library benchmarks at 109142 - close to 4 times as long. If anyone is interested here is the butchered version which uses Adafruit_mfGFX by pkourany http://github.com/mahatmajman/ILI9341_t3
 
Status
Not open for further replies.
Back
Top