ILI9341 Font compression part 1: Good idea ?
While doing something else, i played a bit with adafruit font format.
When dealing with big screen (320x240) , the fonts are getting huge and taking a lot of flash space.
The obvious answer is : Let's compress them !. But how does that fare ?
So i added support for heatshrink in my ILI9341 font rendering engine.
and the result is ......
The pink line is uncompressed font, the blue one is heatshrink'ed font, the axis is font size.
The additional font rendering code + heatshrink takes ~ 800 bytes.
The bottom line is that if the font size is below ~ 32, it' simply not worth the effort. With font below 10, the compressed font is even bigger than the uncompressed font.
In terms of speed, displaying a string of 11 chars with a size 32 font on a 320x240 screen takes :
- 25 ms with uncompressed fonts
- 30ms with compressed fonts
Both includes actual display. So the penalty is not too bad for big fonts.
So end of story ? Not really, see next post.
Comments
Post a Comment