# Typography

# Typography

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

<br />

```
class Typography
```

<br />

*** ** * ** ***

Class holding typography definitions as defined by the Wear Material typography specification.

The text styles in this typography are scaled according to the user's preferred font size in the system settings. Larger font sizes can be fixed if necessary in order to avoid pressure on screen space, because they are already sufficiently accessible. Here is an example of fixing the font size for Display1:  

```kotlin
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import androidx.wear.compose.material.MaterialTheme
import androidx.wear.compose.material.Text

val typography =
    MaterialTheme.typography.copy(
        display1 =
            MaterialTheme.typography.display1.copy(
                fontSize = with(LocalDensity.current) { 40.dp.toSp() }
            )
    )
MaterialTheme(typography = typography) {
    Text(
        text = "Fixed Font",
        maxLines = 1,
        style = MaterialTheme.typography.display1,
        color = MaterialTheme.colors.onBackground,
    )
}
```

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Typography](https://developer.android.com/reference/kotlin/androidx/wear/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))`(` ` defaultFontFamily: `[FontFamily](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily)`,` ` display1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` display2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` display3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` body1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` body2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` button: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) `)` |

|                                          ### Public functions                                          |
|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Typography](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography) | [copy](https://developer.android.com/reference/kotlin/androidx/wear/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))`(` ` display1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` display2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` display3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` title3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` body1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` body2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` button: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption1: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption2: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle)`,` ` caption3: `[TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) `)` Returns a copy of this Typography, optionally overriding some of the values. |
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)    | [equals](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                     | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#hashCode())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)               | [toString](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#toString())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

|                                     ### Public properties                                      |
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [body1](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#body1()) Body1 is the largest body.                                                                                                                           |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [body2](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#body2()) Body2 is the smallest body.                                                                                                                          |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [button](https://developer.android.com/reference/kotlin/androidx/wear/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. |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [caption1](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#caption1()) Caption1 is the largest caption.                                                                                                               |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [caption2](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#caption2()) Caption2 is the second largest caption.                                                                                                        |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [caption3](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#caption3()) Caption3 is an exceptional small font size which is used for the extra long-form writing like legal texts.                                     |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [display1](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#display1()) Display1 is the largest headline.                                                                                                              |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [display2](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#display2()) Display2 is the second largest headline.                                                                                                       |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [display3](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#display3()) Display3 is the third largest headline.                                                                                                        |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [title1](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#title1()) Title1 is the largest title.                                                                                                                       |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [title2](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#title2()) Title2 is the medium title.                                                                                                                        |
| [TextStyle](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle) | [title3](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Typography#title3()) Title3 is the smallest title.                                                                                                                      |

## Public constructors

### Typography

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

```
Typography(
    defaultFontFamily: FontFamily = FontFamily.Default,
    display1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 40.sp,
                lineHeight = 46.sp,
                letterSpacing = 0.5.sp,
            ),
    display2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 34.sp,
                lineHeight = 40.sp,
                letterSpacing = 1.sp,
            ),
    display3: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 30.sp,
                lineHeight = 36.sp,
                letterSpacing = 0.8.sp,
            ),
    title1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 24.sp,
                lineHeight = 28.sp,
                letterSpacing = 0.2.sp,
            ),
    title2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 20.sp,
                lineHeight = 24.sp,
                letterSpacing = 0.2.sp,
            ),
    title3: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 16.sp,
                lineHeight = 20.sp,
                letterSpacing = 0.2.sp,
            ),
    body1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 16.sp,
                lineHeight = 20.sp,
                letterSpacing = 0.18.sp,
            ),
    body2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Normal,
                fontSize = 14.sp,
                lineHeight = 18.sp,
                letterSpacing = 0.2.sp,
            ),
    button: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Bold,
                fontSize = 15.sp,
                lineHeight = 19.sp,
                letterSpacing = 0.38.sp,
            ),
    caption1: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 14.sp,
                lineHeight = 18.sp,
                letterSpacing = 0.1.sp,
            ),
    caption2: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 12.sp,
                lineHeight = 16.sp,
                letterSpacing = 0.1.sp,
            ),
    caption3: TextStyle = DefaultTextStyle.copy(
                fontWeight = FontWeight.Medium,
                fontSize = 10.sp,
                lineHeight = 14.sp,
                letterSpacing = 0.1.sp,
            )
)
```  

## Public functions

### copy

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

```
fun copy(
    display1: TextStyle = this.display1,
    display2: TextStyle = this.display2,
    display3: TextStyle = this.display3,
    title1: TextStyle = this.title1,
    title2: TextStyle = this.title2,
    title3: TextStyle = this.title3,
    body1: TextStyle = this.body1,
    body2: TextStyle = this.body2,
    button: TextStyle = this.button,
    caption1: TextStyle = this.caption1,
    caption2: TextStyle = this.caption2,
    caption3: TextStyle = this.caption3
): Typography
```

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

### equals

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

### hashCode

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

### toString

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

## Public properties

### body1

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

```
val body1: TextStyle
```

Body1 is the largest body. Body texts are 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

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

```
val body2: TextStyle
```

Body2 is the smallest body. Body texts are 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

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#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.  

### caption1

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

```
val caption1: TextStyle
```

Caption1 is the largest caption. Caption texts are the smallest font sizes. They are used on secondary content.  

### caption2

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

```
val caption2: TextStyle
```

Caption2 is the second largest caption. Caption texts are the smallest font sizes. They are used on secondary content.  

### caption3

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

```
val caption3: TextStyle
```

Caption3 is an exceptional small font size which is used for the extra long-form writing like legal texts.  

### display1

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

```
val display1: TextStyle
```

Display1 is the largest headline. Displays are the largest text on the screen, reserved for short, important text or numerals.  

### display2

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

```
val display2: TextStyle
```

Display2 is the second largest headline. Displays are the largest text on the screen, reserved for short, important text or numerals.  

### display3

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

```
val display3: TextStyle
```

Display3 is the third largest headline. Displays are the largest text on the screen, reserved for short, important text or numerals.  

### title1

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

```
val title1: TextStyle
```

Title1 is the largest title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.  

### title2

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

```
val title2: TextStyle
```

Title2 is the medium title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.  

### title3

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

```
val title3: TextStyle
```

Title3 is the smallest title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.