# FontStyle

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/font/FontStyle.kt+class:androidx.compose.ui.text.font.FontStyle) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  value class FontStyle
  ```

*** ** * ** ***

Defines whether the font is `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#Italic()` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#Normal()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily` |   |

## Summary

| ### Public companion functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#values()()` Returns a list of possible values of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle`. | Cmn |

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#Italic()` Use glyphs designed for slanting | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#Normal()` Use the upright glyphs | Cmn |

| ### Public constructors |
|---|---|
| `[FontStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#FontStyle(kotlin.Int))(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Please use FontStyle.Normal or FontStyle.Italic | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#value()` | Cmn |

## Public companion functions

### values

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

```
fun values(): List<FontStyle>
```

Returns a list of possible values of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle`.

## Public companion properties

### Italic

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

```
val Italic: FontStyle
```

Use glyphs designed for slanting

### Normal

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

```
val Normal: FontStyle
```

Use the upright glyphs

## Public constructors

### FontStyle

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

```
[FontStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle#FontStyle(kotlin.Int))(value: Int)
```

> [!CAUTION]
> **This function is deprecated.**   
> Please use FontStyle.Normal or FontStyle.Italic, use this instead:
>
> ```kotlin
> FontStyle.
> ```

## Public functions

### toString

Cmn

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

## Public properties

### value

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

```
val value: Int
```