-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VLW font flicker on frequent text update #346
Comments
Use a Sprite as in your option 2 example but at the beginning set the foreground and background colours for the font e.g. use this line: img.setTextColor(TFT_WHITE, TFT_BLACK); |
It is still pixelized around the anti-alias zone, otherwise there is no flicker as I mentioned. Here is the code:
|
Does "Font_Demo_3" work OK? |
Finally found the culprit... After I tried with Font_Demo_3 (thanks for the idea) and saw that everything looked great with it I started modifying my code to get as close to the Font_Demo_3 as possible because I thought I messed something up. Nothing worked. After 30 minutes of tries I decided to also remove all the BMPs I was drawing by commenting all calls to drawBmp(). Finally the text rendered ok. In the examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino:drawBmp() there is a tft.setSwapBytes(true) at line 37 and after the BMP is drawn that action is not reversed, just added tft.setSwapBytes(false) at the end of drawBmp and finally my strings were rendering great. Thanks again for your suggestions and your work on this library! |
Thanks for finding the solution. I will think how to prevent this from happening as swapping the bytes for fonts was not intentional and hence is a bug. I will re-open this until it is fixed as this was not an intended behaviour. |
Updated example. |
Thanks to Bodmer and all other contributors for their work on this library. I am trying to create a CAN BUS dashboard for my car which fetches data from the OBD2 and displays it on a 1.5" 240x240 SPI ST7789 display.
I am using a VLW font and when I update the numbers at rates quicker than 500ms there is some flicker. I tried the following ways to update the numbers:
=> Letters/numbers render great but there is flickering probably because first we render the rect to cover the old text and after that we render the new text
=> There is no flicker because the whole thing appears at once but the letters look brittle and have some colored pixel artefacts in the area of anti-aliasing.
=> That doesn't seem to work with VLW fonts, the old text remains visible below the new one
Do you have any other suggestions? Thanks in advance!
The text was updated successfully, but these errors were encountered: