# TextStyleStyleScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+class:androidx.compose.foundation.style.TextStyleStyleScope) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  interface TextStyleStyleScope : TextStyleScope, ContentColorScope, TextDecorationScope, FontFamilyScope, TextIndentScope, FontSizeScope, LineHeightScope, LetterSpacingScope, BaselineShiftScope, FontWeightScope, FontStyleScope, TextDirectionScope, TextAlignScope, LineBreakScope, HyphensScope, TextMotionScope, FontSynthesisScope
  ```
Known direct subclasses [StyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` is the receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` lambda. |

*** ** * ** ***

An interface that introduces the text property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` |   |

## Summary

### Inherited functions

From [androidx.compose.foundation.style.BaselineShiftScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/BaselineShiftScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/BaselineShiftScope#baselineShift(androidx.compose.ui.text.style.BaselineShift)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift)`

Sets the baseline shift for the text (e.g., for superscript or subscript).
Cmn From [androidx.compose.foundation.style.ContentColorScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentBrush(androidx.compose.ui.graphics.Brush)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush)`

Sets the preferred brush for rendering content, primarily affecting text.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentColor(androidx.compose.ui.graphics.Color)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`

Sets the preferred content color, primarily affecting text color.
Cmn From [androidx.compose.foundation.style.FontFamilyScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontFamilyScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontFamilyScope#fontFamily(androidx.compose.ui.text.font.FontFamily)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily)`

Sets the font family for the text.
Cmn From [androidx.compose.foundation.style.FontSizeScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontSizeScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontSizeScope#fontSize(androidx.compose.ui.unit.TextUnit)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)`

Sets the font size for the text.
Cmn From [androidx.compose.foundation.style.FontStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontStyleScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontStyleScope#fontStyle(androidx.compose.ui.text.font.FontStyle)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle)`

Sets the font style for the text (e.g., italic, normal).
Cmn From [androidx.compose.foundation.style.FontSynthesisScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontSynthesisScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontSynthesisScope#fontSynthesis(androidx.compose.ui.text.font.FontSynthesis)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontSynthesis)`

Sets the font synthesis strategy, determining if and how bold/italic styles are synthesized when the font family does not natively support them.
Cmn From [androidx.compose.foundation.style.FontWeightScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontWeightScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/FontWeightScope#fontWeight(androidx.compose.ui.text.font.FontWeight)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight)`

Sets the font weight for the text (e.g., bold, normal).
Cmn From [androidx.compose.foundation.style.HyphensScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/HyphensScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/HyphensScope#hyphens(androidx.compose.ui.text.style.Hyphens)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens)`

Sets the hyphenation strategy for text.
Cmn From [androidx.compose.foundation.style.LetterSpacingScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LetterSpacingScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LetterSpacingScope#letterSpacing(androidx.compose.ui.unit.TextUnit)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)`

Sets the letter spacing for the text.
Cmn From [androidx.compose.foundation.style.LineBreakScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LineBreakScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LineBreakScope#lineBreak(androidx.compose.ui.text.style.LineBreak)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak)`

Sets the line breaking strategy for text.
Cmn From [androidx.compose.foundation.style.LineHeightScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LineHeightScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LineHeightScope#lineHeight(androidx.compose.ui.unit.TextUnit)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)`

Sets the line height for the text.
Cmn From [androidx.compose.foundation.style.TextAlignScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextAlignScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextAlignScope#textAlign(androidx.compose.ui.text.style.TextAlign)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign)`

Sets the text alignment (e.g., start, end, center).
Cmn From [androidx.compose.foundation.style.TextDecorationScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextDecorationScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextDecorationScope#textDecoration(androidx.compose.ui.text.style.TextDecoration)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration)`

Sets the text decoration (e.g., underline, line-through).
Cmn From [androidx.compose.foundation.style.TextDirectionScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextDirectionScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextDirectionScope#textDirection(androidx.compose.ui.text.style.TextDirection)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection)`

Sets the text direction (e.g., LTR, RTL, content-based).
Cmn From [androidx.compose.foundation.style.TextIndentScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextIndentScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextIndentScope#textIndent(androidx.compose.ui.text.style.TextIndent)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent)`

Sets the text indent (e.g., for the first line or subsequent lines).
Cmn From [androidx.compose.foundation.style.TextMotionScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextMotionScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextMotionScope#textMotion(androidx.compose.ui.text.style.TextMotion)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion)`

Sets the text motion strategy, which can be used to optimize for readability or for smooth animations.
Cmn From [androidx.compose.foundation.style.TextStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleScope#textStyle(androidx.compose.ui.text.TextStyle)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`

Applies a complete `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` object to the component.
Cmn