-
Notifications
You must be signed in to change notification settings - Fork 963
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
Font sizes #88
Comments
https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts Other-size fonts are available with a few extra steps. And they look much nicer than the default font! |
First of all, thanks for responding so quickly, but you are too quick to close the issue! Here is how they tell you to do it: #include <Adafruit_GFX.h> // Core graphics library As you see, the setFont is TFT specific. |
After looking through the source code for the GFX library I have found that the setFont function is indeed in that library but the "Using Fonts" web page provided says it's in the TFT hardware specific library which causes confusion. There really needs to be much better documentation on these libraries. |
I second that It is not that clear and spend an hour to see if I'm missing something. 1- Include the font header that you wish to use
That's it. |
EDIT: never mind I fixed it by changing the y value of set cursor to 15; Hey, I tried using the example code you gave for using that font, but when I do all it shows are flat stripes. Do you perhaps know what I'm doing wrong? |
Thank-you VERY much @gunhansancar !! |
Thanks to you I just spent 20 min. @gunhansancar |
This is an old post but i had the same problem with scaling the font size. I have changed all variables called TextSize in Adafruit_GFX.cpp and Adafruit_GFX.h from int (uint8_t, int16_t) to float. Now i can granularly change font size to values like 1.2, 1.5 etc.. |
Hii, how did you replaced it ? like uint8_t to ufloat8_t ? and for int16_t the same?? I got an error when I tried to change all the int related to variable TextSize to float |
|
The difference in physical size of fonts using size 1 and size 2 is too great. There needs to be an intermediary size between them. The problem I encountered was that using display.setTextSize(1) makes the font too small to read easily on a 0.96" display and display.setTextSize(2) makes it too big to fit much information.
The text was updated successfully, but these errors were encountered: