# TextStyle

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextStyle.kt+class:androidx.compose.ui.text.TextStyle) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class TextStyle
  ```

*** ** * ** ***

Styling configuration for text.

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp

Text(
    text = "Demo Text",
    style =
        TextStyle(
            color = Color.Red,
            fontSize = 16.sp,
            fontFamily = FontFamily.Monospace,
            fontWeight = FontWeight.W800,
            fontStyle = FontStyle.Italic,
            letterSpacing = 0.5.em,
            background = Color.LightGray,
            textDecoration = TextDecoration.Underline,
        ),
)
```

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp

Text(
    text = "Demo Text",
    style =
        TextStyle(
            brush = Brush.linearGradient(listOf(Color.Red, Color.Blue, Color.Green)),
            alpha = 0.8f,
            fontSize = 16.sp,
            fontFamily = FontFamily.Monospace,
            fontWeight = FontWeight.W800,
            fontStyle = FontStyle.Italic,
            letterSpacing = 0.5.em,
            textDecoration = TextDecoration.Underline,
        ),
)
```

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle` |   |

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#Default()` Constant for default text style. | Cmn |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#TextStyle(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?, textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?, localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign, textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?, platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?, lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?, lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak, hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens, textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? )` Styling configuration for text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#TextStyle(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush?, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?, textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?, localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign, textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?, platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?, lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?, lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak, hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens, textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? )` Styling configuration for text. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?, textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?, localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign, textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?, platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?, lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?, lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak, hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens, textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? )` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush?, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?, textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?, localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign, textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?, platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?, lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?, lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak, hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens, textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? )` | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#hasSameDrawAffectingAttributes(androidx.compose.ui.text.TextStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#hasSameLayoutAffectingAttributes(androidx.compose.ui.text.TextStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)` Returns true if text layout affecting attributes between this TextStyle and other are the same. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#hashCode()()` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.ParagraphStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle)` Returns a new text style that is a combination of this style and the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.ParagraphStyle)` style. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.SpanStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle)` Returns a new text style that is a combination of this style and the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.SpanStyle)` style. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle?)` Merges this style with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.TextMotion)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?, textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?, localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign, textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?, lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?, lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak, hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens, platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?, textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? )` Merges this style with individual styling parameters. | Cmn |
| `operator https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#plus(androidx.compose.ui.text.ParagraphStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle)` Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`. | Cmn |
| `operator https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#plus(androidx.compose.ui.text.SpanStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle)` Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`. | Cmn |
| `operator https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#plus(androidx.compose.ui.text.TextStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)` Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#toParagraphStyle()()` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#toSpanStyle()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#alpha()` Opacity of text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#background()` The background color for the text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#baselineShift()` The amount by which the text is shifted up from the current baseline. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#brush()` The brush to use when drawing text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#color()` The text color. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#deprecated_boxing_hyphens()` **This property is deprecated.** Kept for backwards compatibility. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#deprecated_boxing_lineBreak()` **This property is deprecated.** Kept for backwards compatibility. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#deprecated_boxing_textAlign()` **This property is deprecated.** Kept for backwards compatibility. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#deprecated_boxing_textDirection()` **This property is deprecated.** Kept for backwards compatibility. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#drawStyle()` Drawing style of text, whether fill in the text while drawing or stroke around the edges. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFamily()` The font family to be used when rendering the text. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFeatureSettings()` The advanced typography settings provided by font. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSize()` The size of glyphs to use when painting the text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontStyle()` The typeface variant to use when drawing the letters (e.g., italic). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSynthesis()` Whether to synthesize font weight and/or style when the requested weight or style cannot be found in the provided font family. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontWeight()` The typeface thickness to use when painting the text (e.g., bold). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#hyphens()` The hyphens configuration of the paragraph. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#letterSpacing()` The amount of space to add between each letter. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineBreak()` The line breaking configuration of the paragraph. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()` Line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeightStyle()` The configuration for line height such as vertical alignment of the line, whether to apply additional space as a result of line height to top of first line top and bottom of last line. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#localeList()` The locale list used to select region-specific glyphs. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#platformStyle()` platform specific `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` parameters | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#shadow()` The shadow effect applied on the text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textAlign()` The alignment of the text within the lines of the paragraph. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDecoration()` The decorations to paint on the text (e.g., an underline). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDirection()` The algorithm to be used to resolve the final text and paragraph direction: Left To Right or Right To Left. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textGeometricTransform()` The geometric transformation applied the text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textIndent()` The indentation of the paragraph. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textMotion()` Text character placement configuration, whether to optimize for animated or static text. | Cmn |

## Public companion properties

### Default

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val Default: TextStyle
```

Constant for default text style.

## Public constructors

### TextStyle

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
TextStyle(
    color: Color = Color.Unspecified,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontWeight: FontWeight? = null,
    fontStyle: FontStyle? = null,
    fontSynthesis: FontSynthesis? = null,
    fontFamily: FontFamily? = null,
    fontFeatureSettings: String? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    baselineShift: BaselineShift? = null,
    textGeometricTransform: TextGeometricTransform? = null,
    localeList: LocaleList? = null,
    background: Color = Color.Unspecified,
    textDecoration: TextDecoration? = null,
    shadow: Shadow? = null,
    drawStyle: DrawStyle? = null,
    textAlign: TextAlign = TextAlign.Unspecified,
    textDirection: TextDirection = TextDirection.Unspecified,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    platformStyle: PlatformTextStyle? = null,
    lineHeightStyle: LineHeightStyle? = null,
    lineBreak: LineBreak = LineBreak.Unspecified,
    hyphens: Hyphens = Hyphens.Unspecified,
    textMotion: TextMotion? = null
)
```

Styling configuration for text.

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp

Text(
    text = "Demo Text",
    style =
        TextStyle(
            color = Color.Red,
            fontSize = 16.sp,
            fontFamily = FontFamily.Monospace,
            fontWeight = FontWeight.W800,
            fontStyle = FontStyle.Italic,
            letterSpacing = 0.5.em,
            background = Color.LightGray,
            textDecoration = TextDecoration.Underline,
        ),
)
```

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | color to apply to the text |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | glyph size. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`, inherits size from parent or default style. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | typeface thickness (e.g., bold) |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | typeface variant (e.g., italic) |
| `fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis? = null` | font synthesis rules to fallback to bold/italic if the requested style is missing in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | font family for rendering |
| `fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? = null` | advanced font features in CSS format (e.g., "smcp" for small caps) |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | amount of space (in SP or EM) to add between letters. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`, inherits from parent. |
| `baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift? = null` | vertical shift amount from the baseline (e.g., for superscript or subscript) |
| `textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform? = null` | geometric transformation to apply |
| `localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList? = null` | locale list for region-specific glyphs |
| `background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | color of background rectangle covering entire line height from start to end |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | decorations (e.g., underline) |
| `shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow? = null` | shadow effect |
| `drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle? = null` | drawing style (fill or stroke) |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign = TextAlign.Unspecified` | alignment of the text within the lines of the paragraph. |
| `textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection = TextDirection.Unspecified` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` direction resolution algorithm, defaults to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` signal |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height |
| `textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent? = null` | paragraph indentation |
| `platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle? = null` | platform-specific parameters |
| `lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle? = null` | line height distribution configuration |
| `lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak = LineBreak.Unspecified` | line breaking rules |
| `hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens = Hyphens.Unspecified` | hyphenation configuration. |
| `textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? = null` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion` character placement optimization |

### TextStyle

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
TextStyle(
    brush: Brush?,
    alpha: Float = Float.NaN,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontWeight: FontWeight? = null,
    fontStyle: FontStyle? = null,
    fontSynthesis: FontSynthesis? = null,
    fontFamily: FontFamily? = null,
    fontFeatureSettings: String? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    baselineShift: BaselineShift? = null,
    textGeometricTransform: TextGeometricTransform? = null,
    localeList: LocaleList? = null,
    background: Color = Color.Unspecified,
    textDecoration: TextDecoration? = null,
    shadow: Shadow? = null,
    drawStyle: DrawStyle? = null,
    textAlign: TextAlign = TextAlign.Unspecified,
    textDirection: TextDirection = TextDirection.Unspecified,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    platformStyle: PlatformTextStyle? = null,
    lineHeightStyle: LineHeightStyle? = null,
    lineBreak: LineBreak = LineBreak.Unspecified,
    hyphens: Hyphens = Hyphens.Unspecified,
    textMotion: TextMotion? = null
)
```

Styling configuration for text.

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp

Text(
    text = "Demo Text",
    style =
        TextStyle(
            brush = Brush.linearGradient(listOf(Color.Red, Color.Blue, Color.Green)),
            alpha = 0.8f,
            fontSize = 16.sp,
            fontFamily = FontFamily.Monospace,
            fontWeight = FontWeight.W800,
            fontStyle = FontStyle.Italic,
            letterSpacing = 0.5.em,
            textDecoration = TextDecoration.Underline,
        ),
)
```

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` for painting text, null for unspecified |
| `alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Float.NaN` | opacity applied to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` (0.0 to 1.0) |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | glyph size. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`, inherits size from parent or default style. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | typeface thickness (e.g., bold) |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | typeface variant (e.g., italic) |
| `fontSynthesis: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis? = null` | font synthesis rules to fallback to bold/italic if the requested style is missing in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | font family for rendering |
| `fontFeatureSettings: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? = null` | advanced font features in CSS format (e.g., "smcp" for small caps) |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | amount of space (in SP or EM) to add between letters. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`, inherits from parent. |
| `baselineShift: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift? = null` | vertical shift amount from the baseline (e.g., for superscript or subscript) |
| `textGeometricTransform: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform? = null` | geometric transformation to apply |
| `localeList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList? = null` | locale list for region-specific glyphs |
| `background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | color of background rectangle covering entire line height from start to end |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | decorations (e.g., underline) |
| `shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow? = null` | shadow effect |
| `drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle? = null` | drawing style (fill or stroke) |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign = TextAlign.Unspecified` | alignment of the text within the lines of the paragraph. |
| `textDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection = TextDirection.Unspecified` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` direction resolution algorithm, defaults to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` signal |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height |
| `textIndent: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent? = null` | paragraph indentation |
| `platformStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformTextStyle? = null` | platform-specific parameters |
| `lineHeightStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle? = null` | line height distribution configuration |
| `lineBreak: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak = LineBreak.Unspecified` | line breaking rules |
| `hyphens: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens = Hyphens.Unspecified` | hyphenation configuration. |
| `textMotion: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion? = null` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion` character placement optimization |

## Public functions

### copy

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun copy(
    color: Color = this.spanStyle.color,
    fontSize: TextUnit = this.spanStyle.fontSize,
    fontWeight: FontWeight? = this.spanStyle.fontWeight,
    fontStyle: FontStyle? = this.spanStyle.fontStyle,
    fontSynthesis: FontSynthesis? = this.spanStyle.fontSynthesis,
    fontFamily: FontFamily? = this.spanStyle.fontFamily,
    fontFeatureSettings: String? = this.spanStyle.fontFeatureSettings,
    letterSpacing: TextUnit = this.spanStyle.letterSpacing,
    baselineShift: BaselineShift? = this.spanStyle.baselineShift,
    textGeometricTransform: TextGeometricTransform? = this.spanStyle.textGeometricTransform,
    localeList: LocaleList? = this.spanStyle.localeList,
    background: Color = this.spanStyle.background,
    textDecoration: TextDecoration? = this.spanStyle.textDecoration,
    shadow: Shadow? = this.spanStyle.shadow,
    drawStyle: DrawStyle? = this.spanStyle.drawStyle,
    textAlign: TextAlign = this.paragraphStyle.textAlign,
    textDirection: TextDirection = this.paragraphStyle.textDirection,
    lineHeight: TextUnit = this.paragraphStyle.lineHeight,
    textIndent: TextIndent? = this.paragraphStyle.textIndent,
    platformStyle: PlatformTextStyle? = this.platformStyle,
    lineHeightStyle: LineHeightStyle? = this.paragraphStyle.lineHeightStyle,
    lineBreak: LineBreak = this.paragraphStyle.lineBreak,
    hyphens: Hyphens = this.paragraphStyle.hyphens,
    textMotion: TextMotion? = this.paragraphStyle.textMotion
): TextStyle
```

### copy

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun copy(
    brush: Brush?,
    alpha: Float = this.spanStyle.alpha,
    fontSize: TextUnit = this.spanStyle.fontSize,
    fontWeight: FontWeight? = this.spanStyle.fontWeight,
    fontStyle: FontStyle? = this.spanStyle.fontStyle,
    fontSynthesis: FontSynthesis? = this.spanStyle.fontSynthesis,
    fontFamily: FontFamily? = this.spanStyle.fontFamily,
    fontFeatureSettings: String? = this.spanStyle.fontFeatureSettings,
    letterSpacing: TextUnit = this.spanStyle.letterSpacing,
    baselineShift: BaselineShift? = this.spanStyle.baselineShift,
    textGeometricTransform: TextGeometricTransform? = this.spanStyle.textGeometricTransform,
    localeList: LocaleList? = this.spanStyle.localeList,
    background: Color = this.spanStyle.background,
    textDecoration: TextDecoration? = this.spanStyle.textDecoration,
    shadow: Shadow? = this.spanStyle.shadow,
    drawStyle: DrawStyle? = this.spanStyle.drawStyle,
    textAlign: TextAlign = this.paragraphStyle.textAlign,
    textDirection: TextDirection = this.paragraphStyle.textDirection,
    lineHeight: TextUnit = this.paragraphStyle.lineHeight,
    textIndent: TextIndent? = this.paragraphStyle.textIndent,
    platformStyle: PlatformTextStyle? = this.platformStyle,
    lineHeightStyle: LineHeightStyle? = this.paragraphStyle.lineHeightStyle,
    lineBreak: LineBreak = this.paragraphStyle.lineBreak,
    hyphens: Hyphens = this.paragraphStyle.hyphens,
    textMotion: TextMotion? = this.paragraphStyle.textMotion
): TextStyle
```

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hasSameDrawAffectingAttributes

Cmn Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun hasSameDrawAffectingAttributes(other: TextStyle): Boolean
```

### hasSameLayoutAffectingAttributes

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun hasSameLayoutAffectingAttributes(other: TextStyle): Boolean
```

Returns true if text layout affecting attributes between this TextStyle and other are the same.

The attributes that do not require a layout change are color, textDecoration and shadow.

Majority of attributes change text layout, and examples are line height, font properties, font size, locale etc.

This function can be used to identify if a new text layout is required for a given TextStyle.

| Parameters |
|---|---|
| `other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | The TextStyle to compare to. |

### hashCode

Cmn

```
open fun hashCode(): Int
```

### merge

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun merge(other: ParagraphStyle): TextStyle
```

Returns a new text style that is a combination of this style and the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.ParagraphStyle)` style.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.ParagraphStyle)` |   |

### merge

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun merge(other: SpanStyle): TextStyle
```

Returns a new text style that is a combination of this style and the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.SpanStyle)` style.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.SpanStyle)` |   |

### merge

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun merge(other: TextStyle? = null): TextStyle
```

Merges this style with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`.

Properties of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)` take precedence when they are not unspecified (e.g. `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`). Returns this if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)` is null or `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#Default()`.

| Parameters |
|---|---|
| `other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle? = null` | style to merge |

### merge

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun merge(
    color: Color = Color.Unspecified,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontWeight: FontWeight? = null,
    fontStyle: FontStyle? = null,
    fontSynthesis: FontSynthesis? = null,
    fontFamily: FontFamily? = null,
    fontFeatureSettings: String? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    baselineShift: BaselineShift? = null,
    textGeometricTransform: TextGeometricTransform? = null,
    localeList: LocaleList? = null,
    background: Color = Color.Unspecified,
    textDecoration: TextDecoration? = null,
    shadow: Shadow? = null,
    drawStyle: DrawStyle? = null,
    textAlign: TextAlign = TextAlign.Unspecified,
    textDirection: TextDirection = TextDirection.Unspecified,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    lineHeightStyle: LineHeightStyle? = null,
    lineBreak: LineBreak = LineBreak.Unspecified,
    hyphens: Hyphens = Hyphens.Unspecified,
    platformStyle: PlatformTextStyle? = null,
    textMotion: TextMotion? = null
): TextStyle
```

Merges this style with individual styling parameters.

Similar to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.TextMotion)` but avoids allocation if parameters are default.

Always use this method over the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.TextMotion)` (taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle`) overload when you do not already have a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` allocated. Prefer this over `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` when building a theming system and applying styling information to a specific usage.

Example:

- `this.color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`, param `color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Red()` -\> result `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Red()`

- `this.color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Red()`, param `color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` -\> result `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Red()`

- `this.color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Red()`, param `color` = `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Blue()` -\> result `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Blue()`

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.TextMotion)` |   |

### plus

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
operator fun plus(other: ParagraphStyle): TextStyle
```

Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`.

### plus

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
operator fun plus(other: SpanStyle): TextStyle
```

Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`.

### plus

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
operator fun plus(other: TextStyle): TextStyle
```

Plus operator overload that applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#merge(androidx.compose.ui.text.TextStyle)`.

### toParagraphStyle

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun toParagraphStyle(): ParagraphStyle
```

### toSpanStyle

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun toSpanStyle(): SpanStyle
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### alpha

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0)

```
val alpha: Float
```

Opacity of text. This value is either provided along side Brush, or via alpha channel in color.

### background

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val background: Color
```

The background color for the text.

### baselineShift

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val baselineShift: BaselineShift?
```

The amount by which the text is shifted up from the current baseline.

### brush

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
val brush: Brush?
```

The brush to use when drawing text. If not null, overrides `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#color()`.

### color

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val color: Color
```

The text color.

### deprecated_boxing_hyphens

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val deprecated_boxing_hyphens: Hyphens?
```

> [!CAUTION]
> **This property is deprecated.**   
> Kept for backwards compatibility.

### deprecated_boxing_lineBreak

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val deprecated_boxing_lineBreak: LineBreak?
```

> [!CAUTION]
> **This property is deprecated.**   
> Kept for backwards compatibility.

### deprecated_boxing_textAlign

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val deprecated_boxing_textAlign: TextAlign?
```

> [!CAUTION]
> **This property is deprecated.**   
> Kept for backwards compatibility.

### deprecated_boxing_textDirection

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val deprecated_boxing_textDirection: TextDirection?
```

> [!CAUTION]
> **This property is deprecated.**   
> Kept for backwards compatibility.

### drawStyle

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
val drawStyle: DrawStyle?
```

Drawing style of text, whether fill in the text while drawing or stroke around the edges.

### fontFamily

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontFamily: FontFamily?
```

The font family to be used when rendering the text.

### fontFeatureSettings

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontFeatureSettings: String?
```

The advanced typography settings provided by font. The format is the same as the CSS font-feature-settings attribute: https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop

### fontSize

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontSize: TextUnit
```

The size of glyphs to use when painting the text. This may be `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()` for inheriting from another `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle`.

### fontStyle

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontStyle: FontStyle?
```

The typeface variant to use when drawing the letters (e.g., italic).

### fontSynthesis

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontSynthesis: FontSynthesis?
```

Whether to synthesize font weight and/or style when the requested weight or style cannot be found in the provided font family.

### fontWeight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fontWeight: FontWeight?
```

The typeface thickness to use when painting the text (e.g., bold).

### hyphens

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0)

```
val hyphens: Hyphens
```

The hyphens configuration of the paragraph.

### letterSpacing

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val letterSpacing: TextUnit
```

The amount of space to add between each letter.

### lineBreak

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0)

```
val lineBreak: LineBreak
```

The line breaking configuration of the paragraph.

### lineHeight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val lineHeight: TextUnit
```

Line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM.

### lineHeightStyle

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
val lineHeightStyle: LineHeightStyle?
```

The configuration for line height such as vertical alignment of the line, whether to apply additional space as a result of line height to top of first line top and bottom of last line.

The configuration is applied only when a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()` is defined.

When null, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle#Default()` is used.

### localeList

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val localeList: LocaleList?
```

The locale list used to select region-specific glyphs.

### platformStyle

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
val platformStyle: PlatformTextStyle?
```

platform specific `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` parameters

### shadow

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val shadow: Shadow?
```

The shadow effect applied on the text.

### textAlign

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val textAlign: TextAlign
```

The alignment of the text within the lines of the paragraph.

### textDecoration

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val textDecoration: TextDecoration?
```

The decorations to paint on the text (e.g., an underline).

### textDirection

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val textDirection: TextDirection
```

The algorithm to be used to resolve the final text and paragraph direction: Left To Right or Right To Left. If no value is provided the system will use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` as the primary signal.

### textGeometricTransform

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val textGeometricTransform: TextGeometricTransform?
```

The geometric transformation applied the text.

### textIndent

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val textIndent: TextIndent?
```

The indentation of the paragraph.

### textMotion

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
val textMotion: TextMotion?
```

Text character placement configuration, whether to optimize for animated or static text.