Method MeasureTextSize
MeasureTextSize(string, FontFamily, FontStyle, FontWeight, FontStretch, double)
Measures specified text according to the font settings.
public Size MeasureTextSize(string text, FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight, FontStretch fontStretch, double fontSize)
Parameters
textstringString to measure.
fontFamilyFontFamilyFontFamily used to measure text.
fontStyleFontStyleFontStyle used to measure text.
fontWeightFontWeightFontWeight used to measure text.
fontStretchFontStretchFontStretch used to measure text.
fontSizedoubleFont size used to measure text.
Returns
- Size
Size of measured text.