<h2 id="curvedtext-text-modifier-background-color-fontsize-fontfamily-fontweight-fontstyle-fontsynthesis-style-angulardirection-overflow">curvedText</h2>

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

```kotlin
public fun CurvedScope.curvedText(
    text: String,
    modifier: CurvedModifier = CurvedModifier,
    background: Color = Color.Unspecified,
    color: Color = Color.Unspecified,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontFamily: FontFamily? = null,
    fontWeight: FontWeight? = null,
    fontStyle: FontStyle? = null,
    fontSynthesis: FontSynthesis? = null,
    style: CurvedTextStyle? = null,
    angularDirection: CurvedDirection.Angular? = null,
    overflow: TextOverflow = TextOverflow.Clip,
): Unit
```

CurvedText is a component allowing developers to easily write curved text following the curvature
a circle (usually at the edge of a circular screen). CurvedText can be only created within the
CurvedLayout to ensure the best experience, like being able to specify to positioning.

The default [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) uses the [LocalTextStyle](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalTextStyle) provided by the [MaterialTheme](/jetpack-compose/androidx.wear.compose/compose-material/components/MaterialTheme) / components,
converting it to a [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle). Note that not all parameters are used by [curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText).

If you are setting your own style, you may want to consider first retrieving [LocalTextStyle](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalTextStyle),
and using [TextStyle.copy](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle) to keep any theme defined attributes, only modifying the specific
attributes you want to override, then convert to [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle)

For ease of use, commonly used parameters from [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle) are also present here. The order
of precedence is as follows:
- If a parameter is explicitly set here (i.e, it is _not_ `null` or `TextUnit.Unspecified`), then this parameter will always be used.
- If a parameter is _not_ set, (`null` or `TextUnit.Unspecified`), then the corresponding value from [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) will be used instead.

Additionally, for [color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color), if [color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color) is not set, and [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) does not have a color, then
[LocalContentColor](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentColor) will be used with an alpha of [LocalContentAlpha](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentAlpha)- this allows this
[curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText) or element containing this [curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText) to adapt to different background colors and
still maintain contrast and accessibility.

For samples explicitly specifying style see:

For examples using CompositionLocal to specify the style, see:

For more information, see the
[Curved Text](https://developer.android.com/training/wearables/compose/curved-text) guide.

#### Parameters

| | |
| --- | --- |
| text | The text to display |
| modifier | The [CurvedModifier](/jetpack-compose/androidx.wear.compose/compose-foundation/interfaces/CurvedModifier) to apply to this curved text. |
| background | The background color for the text. |
| color | [Color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color) to apply to the text. If `Color.Unspecified`, and [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) has no color set, this will be [LocalContentColor](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentColor). |
| fontSize | The size of glyphs to use when painting the text. See [TextStyle.fontSize](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle). |
| fontFamily | The font family to be used when rendering the text. |
| fontWeight | The thickness of the glyphs, in a range of [1, 1000]. see [FontWeight](/jetpack-compose/androidx.compose.ui/ui-text/classes/FontWeight) |
| fontStyle | The typeface variant to use when drawing the letters (e.g. italic). |
| fontSynthesis | Whether to synthesize font weight and/or style when the requested weight or style cannot be found in the provided font family. |
| style | Specifies the style to use. |
| angularDirection | Specify if the text is laid out clockwise or anti-clockwise, and if those needs to be reversed in a Rtl layout. If not specified, it will be inherited from the enclosing [curvedRow](/jetpack-compose/androidx.wear.compose/compose-foundation/functions/curvedRow) or [CurvedLayout](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/CurvedLayout) See [CurvedDirection.Angular](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedDirection.Angular). |
| overflow | How visual overflow should be handled. Note that this takes into account only explicit size curved modifiers in this element, to size this element matching the parent's, add a CurvedModifier.weight here. |

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

> **Deprecated** This overload is provided for backwards compatibility with Compose for Wear OS 1.0. A newer overload is available with additional font parameters.

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

<h2 id="curvedtext-text-modifier-background-color-fontsize-style-angulardirection-overflow">curvedText</h2>

```kotlin
public fun CurvedScope.curvedText(
    text: String,
    modifier: CurvedModifier = CurvedModifier,
    background: Color = Color.Unspecified,
    color: Color = Color.Unspecified,
    fontSize: TextUnit = TextUnit.Unspecified,
    style: CurvedTextStyle? = null,
    angularDirection: CurvedDirection.Angular? = null,
    overflow: TextOverflow = TextOverflow.Clip,
): Unit
```

CurvedText is a component allowing developers to easily write curved text following the curvature
a circle (usually at the edge of a circular screen). CurvedText can be only created within the
CurvedLayout to ensure the best experience, like being able to specify to positioning.

The default [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) uses the [LocalTextStyle](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalTextStyle) provided by the [MaterialTheme](/jetpack-compose/androidx.wear.compose/compose-material/components/MaterialTheme) / components,
converting it to a [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle). Note that not all parameters are used by [curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText).

If you are setting your own style, you may want to consider first retrieving [LocalTextStyle](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalTextStyle),
and using [TextStyle.copy](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle) to keep any theme defined attributes, only modifying the specific
attributes you want to override, then convert to [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle)

For ease of use, commonly used parameters from [CurvedTextStyle](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedTextStyle) are also present here. The order
of precedence is as follows:
- If a parameter is explicitly set here (i.e, it is _not_ `null` or `TextUnit.Unspecified`), then this parameter will always be used.
- If a parameter is _not_ set, (`null` or `TextUnit.Unspecified`), then the corresponding value from [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) will be used instead.

Additionally, for [color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color), if [color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color) is not set, and [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) does not have a color, then
[LocalContentColor](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentColor) will be used with an alpha of [LocalContentAlpha](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentAlpha)- this allows this
[curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText) or element containing this [curvedText](/jetpack-compose/androidx.wear.compose/compose-material/functions/curvedText) to adapt to different background colors and
still maintain contrast and accessibility.

For more information, see the
[Curved Text](https://developer.android.com/training/wearables/compose/curved-text) guide.

#### Parameters

| | |
| --- | --- |
| text | The text to display |
| modifier | The [CurvedModifier](/jetpack-compose/androidx.wear.compose/compose-foundation/interfaces/CurvedModifier) to apply to this curved text. |
| background | The background color for the text. |
| color | [Color](/jetpack-compose/androidx.compose.ui/ui-graphics/functions/Color) to apply to the text. If `Color.Unspecified`, and [style](/jetpack-compose/androidx.compose.foundation/foundation/functions/Style) has no color set, this will be [LocalContentColor](/jetpack-compose/androidx.wear.compose/compose-material/properties/LocalContentColor). |
| fontSize | The size of glyphs to use when painting the text. See [TextStyle.fontSize](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle). |
| style | Specifies the style to use. |
| angularDirection | Specify if the text is laid out clockwise or anti-clockwise, and if those needs to be reversed in a Rtl layout. If not specified, it will be inherited from the enclosing [curvedRow](/jetpack-compose/androidx.wear.compose/compose-foundation/functions/curvedRow) or [CurvedLayout](/jetpack-compose/androidx.wear.compose/compose-foundation/composable-functions/CurvedLayout) See [CurvedDirection.Angular](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/CurvedDirection.Angular). |
| overflow | How visual overflow should be handled. Note that this takes into account only explicit size curved modifiers in this element, to size this element matching the parent's, add a CurvedModifier.weight here. |