adafruit/Adafruit-GFX-Library

Simple method for x5 faster font rendering

Bodmer opened this issue · 4 comments

Count horizontal foreground pixels for 2 to 5 times faster font rendering with ILI9341 display.
Particularly beneficial for larger and bold fonts.

Replace code in drawChar() as follows

Code.txt

I ran a test on the speed improvement suggested using an Arduino Mega + ILI9341 TFT with SPI interface and otherwise "stock" Adafruit libraries.

To print "Hello world" in font FreeSerifBold24pt7b 4 times took 1.1 seconds (yawn).

After the mod it took 266ms. So that is a 4x speed improvement which in my view makes it a worthwhile tweak and it conveniently uses a generically supported line drawing function.

Ah I see the multiply symbol asterisk get removed by the format interpreter in the pasted code but I am sure you would have spotted that! Have now added as a text file!

Great improvement! Is really fast!
Please try to add to the Master Branch.

Closed due to lack of interest :-(