Interface ITextMeasureContext
Provides functionality for measuring text and setting font properties. Mirrors the measurement behavior of the HTML5 Canvas 2D context.
public interface ITextMeasureContext
Methods
MeasureText(string)
Measures the width and height of the specified text string using the current font.
Vector MeasureText(string text)
Parameters
text
stringThe text string to measure.
Returns
- Vector
A Vector representing the size of the rendered text. Typically, X is width and Y is line height or baseline ascent.
SetFont(Font)
Sets the font used for all subsequent text drawing and measurement operations.
void SetFont(Font font)
Parameters
font
FontThe font definition to apply.