Typography

class Typography


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

Use typography to make writing legible and beautiful. Material's default type scale includes contrasting and flexible styles to support a wide range of use cases.

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.

To learn more about typography, see Material Design typography.

Summary

Public constructors

Typography(
    displayLarge: TextStyle,
    displayMedium: TextStyle,
    displaySmall: TextStyle,
    headlineLarge: TextStyle,
    headlineMedium: TextStyle,
    headlineSmall: TextStyle,
    titleLarge: TextStyle,
    titleMedium: TextStyle,
    titleSmall: TextStyle,
    bodyLarge: TextStyle,
    bodyMedium: TextStyle,
    bodySmall: TextStyle,
    labelLarge: TextStyle,
    labelMedium: TextStyle,
    labelSmall: TextStyle
)

Public functions

Typography
copy(
    displayLarge: TextStyle,
    displayMedium: TextStyle,
    displaySmall: TextStyle,
    headlineLarge: TextStyle,
    headlineMedium: TextStyle,
    headlineSmall: TextStyle,
    titleLarge: TextStyle,
    titleMedium: TextStyle,
    titleSmall: TextStyle,
    bodyLarge: TextStyle,
    bodyMedium: TextStyle,
    bodySmall: TextStyle,
    labelLarge: TextStyle,
    labelMedium: TextStyle,
    labelSmall: TextStyle
)

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

open operator Boolean
equals(other: Any?)
open Int
open String

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

displayLarge is the largest display text.

TextStyle

displayMedium is the second largest display text.

TextStyle

displaySmall is the smallest display text.

TextStyle

headlineLarge is the largest headline, reserved for short, important text or numerals.

TextStyle

headlineMedium is the second largest headline, reserved for short, important text or numerals.

TextStyle

headlineSmall is the smallest headline, reserved for short, important text or numerals.

TextStyle

labelLarge 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

labelMedium is one of the smallest font sizes.

TextStyle

labelSmall is one of the smallest font sizes.

TextStyle

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

TextStyle

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

TextStyle

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

Public constructors

Typography

Added in 1.0.0
Typography(
    displayLarge: TextStyle = TypographyTokens.DisplayLarge,
    displayMedium: TextStyle = TypographyTokens.DisplayMedium,
    displaySmall: TextStyle = TypographyTokens.DisplaySmall,
    headlineLarge: TextStyle = TypographyTokens.HeadlineLarge,
    headlineMedium: TextStyle = TypographyTokens.HeadlineMedium,
    headlineSmall: TextStyle = TypographyTokens.HeadlineSmall,
    titleLarge: TextStyle = TypographyTokens.TitleLarge,
    titleMedium: TextStyle = TypographyTokens.TitleMedium,
    titleSmall: TextStyle = TypographyTokens.TitleSmall,
    bodyLarge: TextStyle = TypographyTokens.BodyLarge,
    bodyMedium: TextStyle = TypographyTokens.BodyMedium,
    bodySmall: TextStyle = TypographyTokens.BodySmall,
    labelLarge: TextStyle = TypographyTokens.LabelLarge,
    labelMedium: TextStyle = TypographyTokens.LabelMedium,
    labelSmall: TextStyle = TypographyTokens.LabelSmall
)

Public functions

copy

Added in 1.0.0
fun copy(
    displayLarge: TextStyle = this.displayLarge,
    displayMedium: TextStyle = this.displayMedium,
    displaySmall: TextStyle = this.displaySmall,
    headlineLarge: TextStyle = this.headlineLarge,
    headlineMedium: TextStyle = this.headlineMedium,
    headlineSmall: TextStyle = this.headlineSmall,
    titleLarge: TextStyle = this.titleLarge,
    titleMedium: TextStyle = this.titleMedium,
    titleSmall: TextStyle = this.titleSmall,
    bodyLarge: TextStyle = this.bodyLarge,
    bodyMedium: TextStyle = this.bodyMedium,
    bodySmall: TextStyle = this.bodySmall,
    labelLarge: TextStyle = this.labelLarge,
    labelMedium: TextStyle = this.labelMedium,
    labelSmall: TextStyle = this.labelSmall
): 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
val bodyLargeTextStyle

bodyLarge 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.

bodyMedium

Added in 1.0.0
val bodyMediumTextStyle

bodyMedium is the second 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.

bodySmall

Added in 1.0.0
val bodySmallTextStyle

bodySmall 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.

displayLarge

Added in 1.0.0
val displayLargeTextStyle

displayLarge is the largest display text.

displayMedium

Added in 1.0.0
val displayMediumTextStyle

displayMedium is the second largest display text.

displaySmall

Added in 1.0.0
val displaySmallTextStyle

displaySmall is the smallest display text.

headlineLarge

Added in 1.0.0
val headlineLargeTextStyle

headlineLarge 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.

headlineMedium

Added in 1.0.0
val headlineMediumTextStyle

headlineMedium 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.

headlineSmall

Added in 1.0.0
val headlineSmallTextStyle

headlineSmall is the smallest 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.

labelLarge

Added in 1.0.0
val labelLargeTextStyle

labelLarge 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.

labelMedium

Added in 1.0.0
val labelMediumTextStyle

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

labelSmall

Added in 1.0.0
val labelSmallTextStyle

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

titleLarge

Added in 1.0.0
val titleLargeTextStyle

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

titleMedium

Added in 1.0.0
val titleMediumTextStyle

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

titleSmall

Added in 1.0.0
val titleSmallTextStyle

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