Highly optimized ILI9341 (320x240 TFT color display) library

KurtE, et All:
Is there a function call to determine the font size (X,Y) in pixels of the ILI fonts? I am writing a Buttons class and have not been able to determine the actual size in pixels of the font Arial 16.

Thanks,
Ed
 
Is there a function call to determine the font size (X,Y) in pixels of the ILI fonts? I am writing a Buttons class and have not been able to determine the actual size in pixels of the font Arial 16.
As @thebigg mentioned, the Font is proportional.

You can however find out the size of a text string. That is, suppose your button has the text, "Ok"
you can do something like:
Code:
int16_t x, y;
uint16_t w, h;
getTextBounds("Ok", 0, 0, &x, &y, &w, &h);

The code says tell me the bounds of this text, if I start drawing it position 0, 0.
Note: the returned x and y, could be positive or negative. For example with some GFX fonts, they text will extend
beyond the actual bounds, of the start of where you started. The w, and h will also be filled in with the width and height
 
Back
Top