Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

Font and Text Routines

 

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.

 

 

Last edit by cbpporter on 01/30/2010. Do you want to contribute?. T++