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
text
stringString to measure.
fontFamily
FontFamilyFontFamily used to measure text.
fontStyle
FontStyleFontStyle used to measure text.
fontWeight
FontWeightFontWeight used to measure text.
fontStretch
FontStretchFontStretch used to measure text.
fontSize
doubleFont size used to measure text.
Returns
- Size
Size of measured text.