Method GetTextExtent
GetTextExtent(string, Font)
Gets the dimensions of the string using the specified font.
public abstract SizeD GetTextExtent(string text, Font font)
Parameters
Returns
Remarks
This function only works with single-line strings. It works faster than MeasureText methods.