androidx.compose.foundation.text.modifiers

TextAutoSizeLayoutScopeSince 1.8

Sealed interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

An entity that allows performing text layout for auto sizing text.

sealed interface TextAutoSizeLayoutScope : Density

Is a

Functions

performLayout

fun performLayout(
    constraints: Constraints,
    text: AnnotatedString,
    fontSize: TextUnit,
): TextLayoutResult

Lay out the text and return the result of the measurement

Library docs

An entity that allows performing text layout for auto sizing text.

These methods are used by TextAutoSize in the TextAutoSize.getFontSize method, where developers can lay out text with different font sizes and do certain logic depending on whether or not the text overflows.