Size GetTextSize(const wchar *text, Font font, int n = -1)
Size GetTextSize(const WString& text, Font font)
Size GetTextSize(const char *text, byte charset, Font font, int n = -1)
Size GetTextSize(const char *text, Font font, int n = -1)
Size GetTextSize(const String& text, Font font)
Computes the graphical size of text if drawn with font, using font metrics. Returned height is the height of font (ascent+descent), returned with is the total advance width of text. No overhangs are considered. n is a number of characters; if negative (default value), it is obtained using [w]strlen. Text can either be unicode or in 8-bit encoding; in that case either charset is provided or it is assumed to be default charset.
|