TextAutoSizeLayoutScope
Interface
Common
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
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 |
Returns
The result of the measurement |