Docsv2.12.12
Back to API Reference
Struct

LayoutSettings

sealed

Configuration for text layout and positioning.

Remarks

Used by TextLayout to control how text is positioned within the available bounds. Includes settings for maximum dimensions, spacing, and alignment.
public static LayoutSettings Default{ get }

Gets the default layout settings with unlimited dimensions and top-left alignment.

public float maxWidth

Maximum width for text layout. Use FloatMax for unlimited.

public float maxHeight

Maximum height for text layout. Use FloatMax for unlimited.

public float lineSpacing

Additional spacing between lines (can be negative).

public float defaultLineHeight

Fallback line height when font metrics are unavailable.

public HorizontalAlignment horizontalAlignment

Horizontal text alignment within the layout bounds.

public VerticalAlignment verticalAlignment

Vertical text alignment within the layout bounds.

public TextJustify textJustify

How extra space is distributed when horizontalAlignment is Justify. Ignored otherwise.

public LastLineAlignment lastLineAlignment

How the paragraph-terminating line is aligned when horizontalAlignment is Justify. Ignored otherwise.

public TextOverEdge overEdge

Top edge metric for text box trimming.

public TextUnderEdge underEdge

Bottom edge metric for text box trimming.

public LeadingDistribution leadingDistribution

How extra leading from line-height is distributed relative to the content area.

public LineHeightMode lineHeightMode

How each line's height is determined relative to the fonts it contains.

public float lineHeightScale

Line height as a multiple of font size when lineHeightMode is Scaled. Ignored otherwise.

public static LineHeightMode DefaultLineHeightMode

Project-wide default line-height mode seeded into Default. Mirrored from DefaultLineHeightMode and pushed from the main thread, so worker-thread layout reads it without touching Resources.

public static float DefaultLineHeightScale

Project-wide default line-height scale seeded into Default. Mirrored from LineHeightScale.