Docsv2.12.12
Back to API Reference
Struct

TextMeasureOptions

sealed

Box constraints and setting overrides for MeasureText. Every null field falls back to the component's current value, so default measures the current text, as configured, at its natural unconstrained size. Overrides behave exactly like the matching component settings (with autoSize on, fontSize is ignored and minFontSize / maxFontSize drive the fit). Dimensions are outer (Padding included).

public string text

Markup text to measure. Null — the component's current text.

public Nullable<float> maxWidth

Wrap width. Null — unconstrained.

public Nullable<float> maxHeight

Box height: with auto-size the font shrinks to fit maxWidth × this before measuring, like in a real rect. Null — unconstrained. Does not affect flow without auto-size.

public Nullable<float> fontSize
public Nullable<bool> autoSize
public Nullable<float> minFontSize
public Nullable<float> maxFontSize
public Nullable<bool> wordWrap
public Nullable<Vector4> padding