class RemoteTextStyle


A remote-aware text style that mirrors androidx.compose.ui.text.TextStyle but uses remote types where applicable.

Summary

Public companion functions

RemoteTextStyle

Creates a RemoteTextStyle from a TextStyle.

Public companion properties

RemoteTextStyle

Public functions

RemoteTextStyle
copy(
    color: RemoteColor?,
    fontSize: RemoteTextUnit?,
    fontWeight: FontWeight?,
    fontStyle: FontStyle?,
    fontFamily: RemoteFontFamily?,
    letterSpacing: RemoteTextUnit?,
    background: RemoteColor?,
    textAlign: TextAlign?,
    lineHeight: RemoteTextUnit?,
    textDecoration: TextDecoration?,
    lineBreak: LineBreak,
    hyphens: Hyphens,
    fontFeatureSettings: String?,
    fontVariationSettings: FontVariation.Settings?
)

Creates a copy of this RemoteTextStyle with the ability to override individual attributes.

RemoteTextStyle

Returns a new RemoteTextStyle that is a combination of this style and the given other style.

RemoteTextStyle
merge(
    color: RemoteColor?,
    fontSize: RemoteTextUnit?,
    fontWeight: FontWeight?,
    fontStyle: FontStyle?,
    fontFamily: RemoteFontFamily?,
    letterSpacing: RemoteTextUnit?,
    background: RemoteColor?,
    textAlign: TextAlign?,
    lineHeight: RemoteTextUnit?,
    textDecoration: TextDecoration?,
    lineBreak: LineBreak,
    hyphens: Hyphens,
    fontFeatureSettings: String?,
    fontVariationSettings: FontVariation.Settings?
)

Public properties

RemoteColor?

The background color for the text.

RemoteColor?

The color of the text

FontVariation.Settings?
RemoteFontFamily?

the font family to be used when rendering the text.

String?

The advanced typography settings provided by font in CSS format (e.g. "smcp" or "tnum").

RemoteTextUnit?

the size of glyphs to use when painting the text in RemoteTextUnit .

FontStyle?

the font style to use when painting the text (e.g., FontStyle.Italic).

FontVariation.Settings?

The font variation settings to be applied to the text.

FontWeight?

the typeface thickness to use when painting the text (e.g., FontWeight.Bold).

Hyphens

The configuration of hyphenation.

RemoteTextUnit?

the amount of space to add between each letter in RemoteTextUnit .

LineBreak

The configuration of line break.

RemoteTextUnit?

Line height for the text in RemoteTextUnit unit, e.g. SP or EM.

TextAlign?

the alignment of the text within the lines of the paragraph.

TextDecoration?

the decorations to paint on the text (e.g., TextDecoration.Underline).

Public companion functions

fromTextStyle

Added in 1.0.0-alpha19
fun fromTextStyle(style: TextStyle): RemoteTextStyle

Creates a RemoteTextStyle from a TextStyle.

Public companion properties

Default

Added in 1.0.0-alpha19
val DefaultRemoteTextStyle

Public functions

copy

Added in 1.0.0-alpha19
fun copy(
    color: RemoteColor? = this.color,
    fontSize: RemoteTextUnit? = this.fontSize,
    fontWeight: FontWeight? = this.fontWeight,
    fontStyle: FontStyle? = this.fontStyle,
    fontFamily: RemoteFontFamily? = this.fontFamily,
    letterSpacing: RemoteTextUnit? = this.letterSpacing,
    background: RemoteColor? = this.background,
    textAlign: TextAlign? = this.textAlign,
    lineHeight: RemoteTextUnit? = this.lineHeight,
    textDecoration: TextDecoration? = this.textDecoration,
    lineBreak: LineBreak = this.lineBreak,
    hyphens: Hyphens = this.hyphens,
    fontFeatureSettings: String? = this.fontFeatureSettings,
    fontVariationSettings: FontVariation.Settings? = this.fontVariationSettings
): RemoteTextStyle

Creates a copy of this RemoteTextStyle with the ability to override individual attributes.

merge

Added in 1.0.0-alpha19
fun merge(other: RemoteTextStyle?): RemoteTextStyle

Returns a new RemoteTextStyle that is a combination of this style and the given other style.

If other is null, this style is returned. If other has any null properties, the values from this style are used for those properties.

Parameters
other: RemoteTextStyle?

The style to merge into this style.

Returns
RemoteTextStyle

A new RemoteTextStyle with properties from other taking precedence.

merge

Added in 1.0.0-alpha19
fun merge(
    color: RemoteColor? = null,
    fontSize: RemoteTextUnit? = null,
    fontWeight: FontWeight? = null,
    fontStyle: FontStyle? = null,
    fontFamily: RemoteFontFamily? = null,
    letterSpacing: RemoteTextUnit? = null,
    background: RemoteColor? = null,
    textAlign: TextAlign? = null,
    lineHeight: RemoteTextUnit? = null,
    textDecoration: TextDecoration? = null,
    lineBreak: LineBreak = LineBreak.Unspecified,
    hyphens: Hyphens = Hyphens.Unspecified,
    fontFeatureSettings: String? = null,
    fontVariationSettings: FontVariation.Settings? = null
): RemoteTextStyle

Public properties

background

Added in 1.0.0-alpha19
val backgroundRemoteColor?

The background color for the text.

color

Added in 1.0.0-alpha19
val colorRemoteColor?

The color of the text

combinedFontVariationSettings

Added in 1.0.0-alpha19
val combinedFontVariationSettingsFontVariation.Settings?

fontFamily

Added in 1.0.0-alpha19
val fontFamilyRemoteFontFamily?

the font family to be used when rendering the text.

fontFeatureSettings

Added in 1.0.0-alpha19
val fontFeatureSettingsString?

The advanced typography settings provided by font in CSS format (e.g. "smcp" or "tnum").

fontSize

Added in 1.0.0-alpha19
val fontSizeRemoteTextUnit?

the size of glyphs to use when painting the text in RemoteTextUnit .

fontStyle

val fontStyleFontStyle?

the font style to use when painting the text (e.g., FontStyle.Italic).

fontVariationSettings

Added in 1.0.0-alpha19
val fontVariationSettingsFontVariation.Settings?

The font variation settings to be applied to the text.

fontWeight

Added in 1.0.0-alpha19
val fontWeightFontWeight?

the typeface thickness to use when painting the text (e.g., FontWeight.Bold).

hyphens

val hyphensHyphens

The configuration of hyphenation.

letterSpacing

Added in 1.0.0-alpha19
val letterSpacingRemoteTextUnit?

the amount of space to add between each letter in RemoteTextUnit .

lineBreak

val lineBreakLineBreak

The configuration of line break.

lineHeight

Added in 1.0.0-alpha19
val lineHeightRemoteTextUnit?

Line height for the text in RemoteTextUnit unit, e.g. SP or EM.

textAlign

val textAlignTextAlign?

the alignment of the text within the lines of the paragraph.

textDecoration

Added in 1.0.0-alpha19
val textDecorationTextDecoration?

the decorations to paint on the text (e.g., TextDecoration.Underline).