# Typography

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

  ```
  class Typography
  ```

*** ** * ** ***

[Material Design type scale](https://material.io/design/typography/the-type-system.html#type-scale)

The Material Design type scale includes a range of contrasting styles that support the needs of your product and its content.

The type scale is a combination of thirteen styles that are supported by the type system. It contains reusable categories of text, each with an intended application and meaning.

![Typography
image](https://developer.android.com/images/reference/androidx/compose/material/typography.png)

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#Typography(androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle)( defaultFontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily, h1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h3: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h4: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h5: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h6: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, subtitle1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, subtitle2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, body1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, body2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, button: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, caption: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, overline: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` Constructor to create a `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography`. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#copy(androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.TextStyle)( h1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h3: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h4: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h5: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, h6: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, subtitle1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, subtitle2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, body1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, body2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, button: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, caption: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, overline: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` Returns a copy of this Typography, optionally overriding some of the values. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#body1()` body1 is the largest body, and is typically used for long-form writing as it works well for small text sizes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#body2()` body2 is the smallest body, and is typically used for long-form writing as it works well for small text sizes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#button()` button text is a call to action used in different types of buttons (such as text, outlined and contained buttons) and in tabs, dialogs, and cards. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#caption()` caption is one of the smallest font sizes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h1()` h1 is the largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h2()` h2 is the second largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h3()` h3 is the third largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h4()` h4 is the fourth largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h5()` h5 is the fifth largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#h6()` h6 is the sixth largest headline, reserved for short, important text or numerals. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#overline()` overline is one of the smallest font sizes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#subtitle1()` subtitle1 is the largest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography#subtitle2()` subtitle2 is the smallest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. | Cmn |

## Public constructors

### Typography

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

```
Typography(
    defaultFontFamily: FontFamily = FontFamily.Default,
    h1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Light,
                fontSize = 96.sp,
                lineHeight = 112.sp,
                letterSpacing = (-1.5).sp,
            ),
    h2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Light,
                fontSize = 60.sp,
                lineHeight = 72.sp,
                letterSpacing = (-0.5).sp,
            ),
    h3: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 48.sp,
                lineHeight = 56.sp,
                letterSpacing = 0.sp,
            ),
    h4: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 34.sp,
                lineHeight = 36.sp,
                letterSpacing = 0.25.sp,
            ),
    h5: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 24.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.sp,
            ),
    h6: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 20.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.15.sp,
            ),
    subtitle1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 16.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.15.sp,
            ),
    subtitle2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 14.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.1.sp,
            ),
    body1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 16.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.5.sp,
            ),
    body2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 14.sp,
                lineHeight = 20.sp,
                letterSpacing = 0.25.sp,
            ),
    button: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 14.sp,
                lineHeight = 16.sp,
                letterSpacing = 1.25.sp,
            ),
    caption: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 12.sp,
                lineHeight = 16.sp,
                letterSpacing = 0.4.sp,
            ),
    overline: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 10.sp,
                lineHeight = 16.sp,
                letterSpacing = 1.5.sp,
            )
)
```

Constructor to create a `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography`. For information on the types of style defined in this constructor, see the property documentation for `https://developer.android.com/reference/kotlin/androidx/compose/material/Typography`.

| Parameters |
|---|---|
| `defaultFontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily = FontFamily.Default` | the default `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily` to be used for `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle`s provided in this constructor. This default will be used if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily` on the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` is `null`. |
| `h1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Light, fontSize = 96.sp, lineHeight = 112.sp, letterSpacing = (-1.5).sp, )` | h1 is the largest headline, reserved for short, important text or numerals. |
| `h2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Light, fontSize = 60.sp, lineHeight = 72.sp, letterSpacing = (-0.5).sp, )` | h2 is the second largest headline, reserved for short, important text or numerals. |
| `h3: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 48.sp, lineHeight = 56.sp, letterSpacing = 0.sp, )` | h3 is the third largest headline, reserved for short, important text or numerals. |
| `h4: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 34.sp, lineHeight = 36.sp, letterSpacing = 0.25.sp, )` | h4 is the fourth largest headline, reserved for short, important text or numerals. |
| `h5: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 24.sp, lineHeight = 24.sp, letterSpacing = 0.sp, )` | h5 is the fifth largest headline, reserved for short, important text or numerals. |
| `h6: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Medium, fontSize = 20.sp, lineHeight = 24.sp, letterSpacing = 0.15.sp, )` | h6 is the sixth largest headline, reserved for short, important text or numerals. |
| `subtitle1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 16.sp, lineHeight = 24.sp, letterSpacing = 0.15.sp, )` | subtitle1 is the largest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. |
| `subtitle2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Medium, fontSize = 14.sp, lineHeight = 24.sp, letterSpacing = 0.1.sp, )` | subtitle2 is the smallest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. |
| `body1: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 16.sp, lineHeight = 24.sp, letterSpacing = 0.5.sp, )` | body1 is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
| `body2: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 14.sp, lineHeight = 20.sp, letterSpacing = 0.25.sp, )` | body2 is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
| `button: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Medium, fontSize = 14.sp, lineHeight = 16.sp, letterSpacing = 1.25.sp, )` | button text is a call to action used in different types of buttons (such as text, outlined and contained buttons) and in tabs, dialogs, and cards. |
| `caption: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 12.sp, lineHeight = 16.sp, letterSpacing = 0.4.sp, )` | caption is one of the smallest font sizes. It is used sparingly to annotate imagery or to introduce a headline. |
| `overline: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = DefaultTextStyle.copy( fontWeight = FontWeight.Normal, fontSize = 10.sp, lineHeight = 16.sp, letterSpacing = 1.5.sp, )` | overline is one of the smallest font sizes. It is used sparingly to annotate imagery or to introduce a headline. |

## Public functions

### copy

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

```
fun copy(
    h1: TextStyle = this.h1,
    h2: TextStyle = this.h2,
    h3: TextStyle = this.h3,
    h4: TextStyle = this.h4,
    h5: TextStyle = this.h5,
    h6: TextStyle = this.h6,
    subtitle1: TextStyle = this.subtitle1,
    subtitle2: TextStyle = this.subtitle2,
    body1: TextStyle = this.body1,
    body2: TextStyle = this.body2,
    button: TextStyle = this.button,
    caption: TextStyle = this.caption,
    overline: TextStyle = this.overline
): Typography
```

Returns a copy of this Typography, optionally overriding some of the values.

### equals

Cmn

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

### hashCode

Cmn

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

### toString

Cmn

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

## Public properties

### body1

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

```
val body1: TextStyle
```

body1 is the largest body, and is typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.

### body2

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

```
val body2: TextStyle
```

body2 is the smallest body, and is typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.

### button

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

```
val button: TextStyle
```

button text is a call to action used in different types of buttons (such as text, outlined and contained buttons) and in tabs, dialogs, and cards. Button text is typically sans serif, using all caps text.

### caption

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

```
val caption: TextStyle
```

caption is one of the smallest font sizes. It is used sparingly to annotate imagery or to introduce a headline.

### h1

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

```
val h1: TextStyle
```

h1 is the largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### h2

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

```
val h2: TextStyle
```

h2 is the second largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### h3

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

```
val h3: TextStyle
```

h3 is the third largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### h4

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

```
val h4: TextStyle
```

h4 is the fourth largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### h5

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

```
val h5: TextStyle
```

h5 is the fifth largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### h6

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

```
val h6: TextStyle
```

h6 is the sixth largest headline, reserved for short, important text or numerals. For headlines, you can choose an expressive font, such as a display, handwritten, or script style. These unconventional font designs have details and intricacy that help attract the eye.

### overline

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

```
val overline: TextStyle
```

overline is one of the smallest font sizes. It is used sparingly to annotate imagery or to introduce a headline.

### subtitle1

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

```
val subtitle1: TextStyle
```

subtitle1 is the largest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. Serif or sans serif typefaces work well for subtitles.

### subtitle2

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

```
val subtitle2: TextStyle
```

subtitle2 is the smallest subtitle, and is typically reserved for medium-emphasis text that is shorter in length. Serif or sans serif typefaces work well for subtitles.