marekburiak / ILI9341_due

Arduino Due and AVR (Uno, Mega, Nano, Pro Mini,...) library for interfacing with ILI9341 SPI TFTs
http://marekburiak.github.io/ILI9341_due
99 stars 36 forks source link

transparent text mode glitch #19

Closed ImpulseAdventure closed 5 years ago

ImpulseAdventure commented 5 years ago

Hello Marek! -- Thank you for producing this well-optimized display library! The performance is excellent and it is good to see the thought that has gone into the justified text enhancements.

I am in the process of integrating support for ILI9341_due into the GUIslice GUI library but ran into what appears to be an issue with gTextFontModeTransparent mode rendering.

Observation

IMG_4035-c

Debug

I haven't yet tried to debug the drawTransparentChar() routine in detail, but I suspect there is an issue that is triggering the following clause erroneously, with lineEnd=6: image My guess would be that a character with a bit set at the bottom row of the previous column followed by a column with no bits set causes lingering state that is detected in the full vertical strip clause above.

Details

Steps to Reproduce

Thanks again very much for the library!

marekburiak commented 5 years ago

Thanks for reporting the issue Calvin. Not sure when I'll be able to look at it though. If you get tired of waiting for the fix and decide and manage to fix it yourself then feel free to send me the fix and I'll update the library on GitHub with your name mentioned in the readme for eternity ;) And just out of curiosity, does it only happen with SystemFont5x7 or with other (custom) fonts as well? I haven't used this font much while developing so that's probably why I haven't noticed it.

ImpulseAdventure commented 5 years ago

Hi Marek! I think I have identified a suitable fix and am in the process of testing it with other fonts. If it continues to look stable, I will file a PR for your repo.

I believe the issue can theoretically occur in any fonts on characters that have a high-order bit set in the vertical raster, followed by a blank column. As the SystemFont5x7 is monospaced, there is a greater likelihood (versus proportional fonts) of having characters that encode trailing blank padding columns.

thanks!

ImpulseAdventure commented 5 years ago

Closing the issue as Marek has merged my PR #20 . Thanks!