<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class RemoteTextStyle
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
constructor(
    public val color: RemoteColor? = null,
    public val fontSize: RemoteTextUnit? = null,
    public val fontWeight: FontWeight? = null,
    public val fontStyle: FontStyle? = null,
    public val fontFamily: FontFamily? = null,
    public val letterSpacing: RemoteTextUnit? = null,
    public val background: RemoteColor? = null,
    public val textAlign: TextAlign? = null,
    public val lineHeight: RemoteTextUnit? = null,
    public val textDecoration: TextDecoration? = null,
)
```

A remote-aware text style that mirrors [androidx.compose.ui.text.TextStyle](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle) but uses remote types
where applicable.

#### Parameters

| | |
| --- | --- |
| color | The color of the text |
| fontSize | the size of glyphs to use when painting the text in [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit) . |
| fontWeight | the typeface thickness to use when painting the text (e.g., `FontWeight.Bold`). |
| fontStyle | The indentation of the paragraph. |
| fontFamily | the font family to be used when rendering the text. |
| letterSpacing | the amount of space to add between each letter in [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit) . |
| background | The background color for the text. |
| textAlign | the alignment of the text within the lines of the paragraph. |
| lineHeight | Line height for the text in [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit) unit, e.g. SP or EM. |
| textDecoration | The configuration of hyphenation. |

## Functions

<h2 id="merge-other">merge</h2>

```kotlin
public fun merge(other: RemoteTextStyle?): RemoteTextStyle
```

Returns a new [RemoteTextStyle](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextStyle) that is a combination of this style and the given `other`
style.

If `other` is null, this style is returned. If `other` has any null properties, the values
from this style are used for those properties.

#### Parameters

| | |
| --- | --- |
| other | The style to merge into this style. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteTextStyle](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextStyle) with properties from `other` taking precedence. |

<hr class="docs-overload-divider">

<h2 id="merge-color-fontsize-fontweight-fontstyle-fontfamily-letterspacing-background-textalign-lineheight-textdecoration">merge</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun merge(
        color: RemoteColor? = null,
        fontSize: RemoteTextUnit? = null,
        fontWeight: FontWeight? = null,
        fontStyle: FontStyle? = null,
        fontFamily: FontFamily? = null,
        letterSpacing: RemoteTextUnit? = null,
        background: RemoteColor? = null,
        textAlign: TextAlign? = null,
        lineHeight: RemoteTextUnit? = null,
        textDecoration: TextDecoration? = null,
    ): RemoteTextStyle
```

<hr class="docs-overload-divider">

<h2 id="copy-color-fontsize-fontweight-fontstyle-fontfamily-letterspacing-background-textalign-lineheight-textdecoration">copy</h2>

```kotlin
public fun copy(
        color: RemoteColor? = this.color,
        fontSize: RemoteTextUnit? = this.fontSize,
        fontWeight: FontWeight? = this.fontWeight,
        fontStyle: FontStyle? = this.fontStyle,
        fontFamily: FontFamily? = this.fontFamily,
        letterSpacing: RemoteTextUnit? = this.letterSpacing,
        background: RemoteColor? = this.background,
        textAlign: TextAlign? = this.textAlign,
        lineHeight: RemoteTextUnit? = this.lineHeight,
        textDecoration: TextDecoration? = this.textDecoration,
    ): RemoteTextStyle
```

Creates a copy of this [RemoteTextStyle](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextStyle) with the ability to override individual attributes.

## Companion Object

#### Properties

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public val Default: RemoteTextStyle
```

#### Methods

<hr class="docs-overload-divider">

<h2 id="fromtextstyle-style">fromTextStyle</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun fromTextStyle(style: TextStyle): RemoteTextStyle
```

Creates a [RemoteTextStyle](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextStyle) from a [TextStyle](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle).