Typography
class Typography
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 Typography instance.
Summary
Public constructors |
|---|
Typography(Creates a Jetpack Compose Glimmer type scale. |
Public functions |
|
|---|---|
Typography |
copy(Returns a copy of this Typography, optionally overriding some of the values. |
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
TextStyle |
bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
TextStyle |
bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes. |
TextStyle |
bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
TextStyle |
caption is the smallest text style, and should be used sparingly for use-cases where text is not essential to the user experience. |
TextStyle |
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
TextStyle |
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
TextStyle |
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |
Public constructors
Typography
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: FontFamily? = null |
the default |
titleLarge: TextStyle = TypographyDefaults.TitleLarge |
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
titleMedium: TextStyle = TypographyDefaults.TitleMedium |
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
titleSmall: TextStyle = TypographyDefaults.TitleSmall |
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |
bodyLarge: 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: 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: 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: 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
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.
Public properties
bodyLarge
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
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
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
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
val titleLarge: TextStyle
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.
titleMedium
val titleMedium: TextStyle
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.
titleSmall
val titleSmall: TextStyle
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.