---
title: "TextAutoSizeLayoutScope"
description: "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."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
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

```kotlin
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 |




