🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

TextAutoSizeLayoutScope

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

Source set: Common
public sealed interface TextAutoSizeLayoutScope : Density

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.

Functions

performLayout

Source set: Common
public fun performLayout(
        constraints: Constraints,
        text: AnnotatedString,
        fontSize: TextUnit,
    ): TextLayoutResult

Lay out the text and return the result of the measurement

Parameters

constraints The constraints to lay the text out with
text The text to lay out
fontSize The font size to lay the text out with

Return

The result of the measurement