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 functions

RemoteTextStyle
copy(
    color: RemoteColor?,
    fontSize: RemoteTextUnit?,
    fontWeight: FontWeight?,
    fontStyle: FontStyle?,
    fontFamily: RemoteFontFamily?,
    letterSpacing: RemoteTextUnit?,
    background: RemoteColor?,
    textAlign: TextAlign?,
    lineHeight: RemoteTextUnit?,
    textDecoration: TextDecoration?
)

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.

Public properties

RemoteColor?

The background color for the text.

RemoteColor?

The color of the text

RemoteFontFamily?

the font family to be used when rendering the text.

RemoteTextUnit?

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

FontStyle?

The indentation of the paragraph.

FontWeight?

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

RemoteTextUnit?

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

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 configuration of hyphenation.

Public companion functions

fromTextStyle

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

Creates a RemoteTextStyle from a TextStyle.

Public functions

copy

Added in 1.0.0-alpha12
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
): RemoteTextStyle

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

merge

Added in 1.0.0-alpha12
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.

Public properties

background

Added in 1.0.0-alpha12
val backgroundRemoteColor?

The background color for the text.

color

Added in 1.0.0-alpha12
val colorRemoteColor?

The color of the text

fontFamily

Added in 1.0.0-alpha12
val fontFamilyRemoteFontFamily?

the font family to be used when rendering the text.

fontSize

Added in 1.0.0-alpha12
val fontSizeRemoteTextUnit?

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

fontStyle

val fontStyleFontStyle?

The indentation of the paragraph.

fontWeight

Added in 1.0.0-alpha12
val fontWeightFontWeight?

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

letterSpacing

Added in 1.0.0-alpha12
val letterSpacingRemoteTextUnit?

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

lineHeight

Added in 1.0.0-alpha12
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-alpha12
val textDecorationTextDecoration?

The configuration of hyphenation.