Method MeasureTextSize
MeasureTextSize(string, FontFamily, FontStyle, FontWeight, FontStretch, double)
Measures the 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 the text.
fontStyle
FontStyleFontStyle used to measure the text.
fontWeight
FontWeightFontWeight used to measure the text.
fontStretch
FontStretchFontStretch used to measure vtext.
fontSize
doubleFont size used to measure the text.
Returns
- Size
Size of measured text.