sumotoy / RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
GNU General Public License v3.0
79 stars 55 forks source link

Possible font rendering optimizer algorithm issues... #74

Closed sumotoy closed 8 years ago

sumotoy commented 8 years ago

The new font rendering engine (0.70b11) it's really fast, it's a unique approach never seen in other libraries and unique to this one, optimized for the hardware accelleration features of RA8875.
It pre-detect blank or filled line and process only lines where there's different pixels, in brief it analize the line, take the first pixel as reference and count concurrency till change then write line/pixel, from there it repeat operation till line end. You can see how it works by enabling RA8875_VISPIXDEBUG in settings, the magenta it's the space detected (that in real life will never processed) and font data is showed in bloks. In this way a char is writed by using the less possible commands so I got a speed improve from over 20 times to 50 and more!. The font glyphs are readed from top->left to right and data it's stored in chunks of byte filled to save space. The font file just contain the minimum data possible to save space so why I decided to use my approach, other libraries have nice conversion progs but create ram/eeprom heavy-files and other ones uses python scripts where you don't have any control to the output and create jagged chars, etc. With program proposed you have the ability to edit every char or even add/remove, the only missed feature it's the ability to reorder chars by changing it's code

However I got a couple of weird chars that wont show correctly, a couple in thousands but I'm still investigating why so I expect to proceed a fix to the font render optimizer algorithm as soon I discovered what is triggering the bug, not a big deal since 99.9% of the time works correctly but this bugs me.

UPDATE: I can finally replicate the error, will be fixed in 0.70b11p5

sumotoy commented 8 years ago

Fixed in 0.70b11p5