Table of Contents

Method MeasureText

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

MeasureText(ReadOnlySpan<char>, Font)

Measures the specified string when drawn with the specified Font. Calls internally GetTextExtent(ReadOnlySpan<char>, Font).

SizeD MeasureText(ReadOnlySpan<char> text, Font font)

Parameters

text ReadOnlySpan<char>

String to measure.

font Font

Font that defines the text format of the string.

Returns

SizeD

This method returns a SizeD structure that represents the size, in device-independent units, of the string specified by the text parameter as drawn with the font parameter.