ILI9341 Font compression Part 2 : anti aliasing

 One bit per pixel font are a bit harsh on the eye.

Let's increase the bit-per-pixel to 2, that is a pixel can have a value between 0 and 3.

The above pic is one bit per pixel


                                                               That one is two bits per pixel.

It's not that obvious, but the 2bpp one is much nicer to look at, especially with very small fonts.

Of course,  it basically doubles the flash size consumed by the font bitmap.

Unfortunately, the  rule seen previously still applies : Compression is not working for small fonts.

But for big fonts you get anti aliased font for ~ free (flash size), and for cheaper for medium fonts.

In terms of code size :

  • Adding 2 bits per pixel support : +~ 500 bytes
  • Adding compression support :     + ~2kBytes

In terms of speed, if we ignore the SPI/parralel bus time, to display 10 characters (size 32) :
   -1bpp nc : 5.5ms
   -1bpp c   : 9.5 ms
   -2bpp nc : 6 ms
   -2bpp c   : 12.5 ms

So using 2bpp in terms of cpu load  is not very heavy.

Comments

Popular posts from this blog

Component tester with STM32 : Part 1 ADC, Resistor

Fixing the INA3221

INA3221, weird wiring