Typography
public final class Typography
The Glimmer type scale includes a range of contrasting styles that support the needs of your product and its content.
Summary
Public constructors |
|---|
Typography(Creates a Glimmer type scale. |
Public methods |
|
|---|---|
final @NonNull Typography |
copy(Returns a copy of this Typography, optionally overriding some of the values. |
boolean |
|
final @NonNull TextStyle |
bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
final @NonNull TextStyle |
bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes. |
final @NonNull TextStyle |
bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
final @NonNull TextStyle |
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
final @NonNull TextStyle |
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
final @NonNull TextStyle |
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |
int |
hashCode() |
@NonNull String |
toString() |
Public constructors
Typography
public Typography(
FontFamily defaultFontFamily,
@NonNull TextStyle titleLarge,
@NonNull TextStyle titleMedium,
@NonNull TextStyle titleSmall,
@NonNull TextStyle bodyLarge,
@NonNull TextStyle bodyMedium,
@NonNull TextStyle bodySmall
)
Creates a Glimmer type scale.
| Parameters | |
|---|---|
FontFamily defaultFontFamily |
the default |
@NonNull TextStyle titleLarge |
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length. |
@NonNull TextStyle titleMedium |
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length. |
@NonNull TextStyle titleSmall |
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length. |
@NonNull TextStyle bodyLarge |
bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes. |
@NonNull TextStyle bodyMedium |
bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes. |
@NonNull TextStyle bodySmall |
bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes. |
Public methods
copy
public final @NonNull Typography copy(
@NonNull TextStyle titleLarge,
@NonNull TextStyle titleMedium,
@NonNull TextStyle titleSmall,
@NonNull TextStyle bodyLarge,
@NonNull TextStyle bodyMedium,
@NonNull TextStyle bodySmall
)
Returns a copy of this Typography, optionally overriding some of the values.
getBodyLarge
public final @NonNull TextStyle getBodyLarge()
bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes.
getBodyMedium
public final @NonNull TextStyle getBodyMedium()
bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes.
getBodySmall
public final @NonNull TextStyle getBodySmall()
bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes.
getTitleLarge
public final @NonNull TextStyle getTitleLarge()
titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.
getTitleMedium
public final @NonNull TextStyle getTitleMedium()
titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.
getTitleSmall
public final @NonNull TextStyle getTitleSmall()
titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.