---
title: "ParagraphIntrinsics"
description: "Factory method to create a [ParagraphIntrinsics].

If the [style] does not contain any [androidx.compose.ui.text.style.TextDirection],
[androidx.compose.ui.text.style.TextDirection.Content] is used as the default value."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Font.ResourceLoader is deprecated, instead use FontFamily.Resolver

```kotlin
fun ParagraphIntrinsics(
    text: String,
    style: TextStyle,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    density: Density,
    resourceLoader: Font.ResourceLoader,
): ParagraphIntrinsics
```


Factory method to create a `ParagraphIntrinsics`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.



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


> **Deprecated** Use an overload that takes `annotations` instead

```kotlin
fun ParagraphIntrinsics(
    text: String,
    style: TextStyle,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
): ParagraphIntrinsics
```


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


```kotlin
fun ParagraphIntrinsics(
    text: String,
    style: TextStyle,
    annotations: List<AnnotatedString.Range<out AnnotatedString.Annotation>>,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
): ParagraphIntrinsics
```


Factory method to create a `ParagraphIntrinsics`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.



