[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

Custom Font Problem /w GFX Library RSS feed
Forum Index » tcMenu Arduinio library
Author Message
betti54


Joined: Jul 17, 2020
Messages: 5
Offline
Hi,

I'm working on a solution using a 2.4" TFT with Adafruit GFX library. TcMenu works a charm, but I've just switched from default font to custom font and encountered a major issue.

I take over the display render my display using gfx.setFont, then go into the menu. Upon exiting menu, my display fails to render properly using the same code (font size is much larger, and x y positions are shot). The bug only arises when I use custom fonts, if I stick to the default all is good.

Any help would be appreciated.

thanks, Damien
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Hi there,

Good to know most things are working for you.

This sounds like a bug in the Adafruit_GFX renderer, please can you raise a bug report in the tcMenu project: https://github.com/davetcc/tcMenu

For the time being until we can fix it when you call give back display, set the font back to the default one. I think that will work as a temporary solution.
betti54


Joined: Jul 17, 2020
Messages: 5
Offline
Hi,

Thanks for the insight.

I had made attempts to reset the font using gfx.setFont() and gfx.setFont(NULL), both without success. Based on your input though, I thought I'd try reset the text size which seemed to do the trick.

A call to gfx.setTextSize(1) seems to reset things, even though I'm using custom font with fixed size anyway.

I've raised an issue on GitHub with reference to this post also. Seems an easy fix now, though one last eluded me earlier.

Thanks for the help, Damien

 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.