# Typography

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


```
class Typography
```

<br />

*** ** * ** ***

The Jetpack Compose Glimmer type scale includes a range of contrasting styles that support the needs of your product and its content.

It is recommended to use `createGoogleSansFlexTypography()` from `androidx.xr.glimmer:glimmer-google-fonts` to create your `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography` instance.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/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)( defaultFontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, titleLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, titleMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, titleSmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodyLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodyMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodySmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, caption: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` Creates a Jetpack Compose Glimmer type scale. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/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)( titleLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, titleMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, titleSmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodyLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodyMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, bodySmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, caption: 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 https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#bodyLarge()` bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#bodyMedium()` bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#bodySmall()` bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#caption()` caption is the smallest text style, and should be used sparingly for use-cases where text is not essential to the user experience. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#titleLarge()` titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#titleMedium()` titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Typography#titleSmall()` titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |

## Public constructors

### Typography

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
Typography(
    defaultFontFamily: FontFamily? = null,
    titleLarge: TextStyle = TypographyDefaults.TitleLarge,
    titleMedium: TextStyle = TypographyDefaults.TitleMedium,
    titleSmall: TextStyle = TypographyDefaults.TitleSmall,
    bodyLarge: TextStyle = TypographyDefaults.BodyLarge,
    bodyMedium: TextStyle = TypographyDefaults.BodyMedium,
    bodySmall: TextStyle = TypographyDefaults.BodySmall,
    caption: TextStyle = TypographyDefaults.Caption
)
```

Creates a Jetpack Compose Glimmer type scale.

| Parameters |
|---|---|
| `defaultFontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | 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`. |
| `titleLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.TitleLarge` | titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
| `titleMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.TitleMedium` | titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
| `titleSmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.TitleSmall` | titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |
| `bodyLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.BodyLarge` | bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
| `bodyMedium: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.BodyMedium` | bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes. |
| `bodySmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.BodySmall` | bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
| `caption: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TypographyDefaults.Caption` | caption is the smallest text style, and should be used sparingly for use-cases where it is not essential to the user experience. |

## Public functions

### copy

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
fun copy(
    titleLarge: TextStyle = this.titleLarge,
    titleMedium: TextStyle = this.titleMedium,
    titleSmall: TextStyle = this.titleSmall,
    bodyLarge: TextStyle = this.bodyLarge,
    bodyMedium: TextStyle = this.bodyMedium,
    bodySmall: TextStyle = this.bodySmall,
    caption: TextStyle = this.caption
): 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

### bodyLarge

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val bodyLarge: TextStyle
```

bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes.

### bodyMedium

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val bodyMedium: TextStyle
```

bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes.

### bodySmall

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val bodySmall: TextStyle
```

bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes.

### caption

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val caption: TextStyle
```

caption is the smallest text style, and should be used sparingly for use-cases where text is not essential to the user experience.

### titleLarge

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val titleLarge: TextStyle
```

titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.

### titleMedium

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val titleMedium: TextStyle
```

titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.

### titleSmall

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val titleSmall: TextStyle
```

titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.