🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

RemoteTextStyle

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

Source set: Android
public class RemoteTextStyle constructor(
    public val color: RemoteColor? = null,
    public val fontSize: RemoteTextUnit? = null,
    public val fontWeight: FontWeight? = null,
    public val fontStyle: FontStyle? = null,
    public val fontFamily: RemoteFontFamily? = null,
    public val letterSpacing: RemoteTextUnit? = null,
    public val background: RemoteColor? = null,
    public val textAlign: TextAlign? = null,
    public val lineHeight: RemoteTextUnit? = null,
    public val textDecoration: TextDecoration? = null,
    public val lineBreak: LineBreak = LineBreak.Unspecified,
    public val hyphens: Hyphens = Hyphens.Unspecified,
    public val fontFeatureSettings: String? = null,
    public val fontVariationSettings: FontVariation.Settings? = null,
)

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

Parameters

color The color of the text
fontSize the size of glyphs to use when painting the text in RemoteTextUnit .
fontWeight the typeface thickness to use when painting the text (e.g., FontWeight.Bold).
fontStyle the font style to use when painting the text (e.g., FontStyle.Italic).
fontFamily the font family to be used when rendering the text.
letterSpacing the amount of space to add between each letter in RemoteTextUnit .
background The background color for the text.
textAlign the alignment of the text within the lines of the paragraph.
lineHeight Line height for the text in RemoteTextUnit unit, e.g. SP or EM.
textDecoration the decorations to paint on the text (e.g., TextDecoration.Underline).
lineBreak The configuration of line break.
hyphens The configuration of hyphenation.
fontFeatureSettings The advanced typography settings provided by font in CSS format (e.g. "smcp" or "tnum").
fontVariationSettings The font variation settings to be applied to the text.

Properties

combinedFontVariationSettings

Source set: Android
public val combinedFontVariationSettings: FontVariation.Settings?

Functions

merge

Source set: Android
public 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 The style to merge into this style.

Return

A new RemoteTextStyle with properties from other taking precedence.

merge

Source set: Android
public 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

copy

Source set: Android
public 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.

Members

Companion

Source set: Android
public companion object

Properties

Default

Source set: Android
public val Default: RemoteTextStyle = RemoteTextStyle()

Functions

fromTextStyle

Source set: Android
public fun fromTextStyle(style: TextStyle): RemoteTextStyle

Creates a RemoteTextStyle from a TextStyle.

Content updated: