I have an image of a rectangle, and I need to draw the rectangle's dimensions in it. Now I want to find out the size of a text I'm about to draw so that I can determine an appropriate font size, as to make sure the text does not go outside of the rectangles boundaries, but also not unnecessarily small. I was using this: http://www.codeproject.com/Articles/363908/Simple-two-file-graphics-library-for-C-Cplusplus library before but it as a bit to restricted in it's use, but it did have a function
int ezd_text_size( HEZDFONT x_hFont, const char *x_pText, int x_nTextLen, int *pw, int *ph )
Which given a font and a char* will calculate the length and width of the area the drawn text would require. I cannot find anything similar in the Cimg documentation though.
So does someone have experience with this issue using Cimg?