public sealed interface RemoteTypeface
A sealed interface that represent the concept of a Typeface in Remote Compose.
Custom or named system fonts are represented by Named type and are registered in the document as Strings to be referenced.
Properties
name
public val name: String
The name used to identify the font in the document and player
Members
Default
public object Default : RemoteTypeface
Represents the default system font.
Properties
name
override val name: String = "default"
DefaultBold
public object DefaultBold : RemoteTypeface
Represents the default bold system font.
Properties
name
override val name: String = "default-bold"
SansSerif
public object SansSerif : RemoteTypeface
Represents the sans-serif system font.
Properties
name
override val name: String = "sans-serif"
Serif
public object Serif : RemoteTypeface
Represents the serif system font.
Properties
name
override val name: String = "serif"
Monospace
public object Monospace : RemoteTypeface
Represents the monospace system font.
Properties
name
override val name: String = "monospace"
Named
public class Named(
private val fontName: String,
@IntRange(from = 1, to = 1000) public val weight: Int = 400,
public val isItalic: Boolean = false,
) : RemoteTypeface
Represents a system font referenced by name.
Parameters
| fontName | The string name of the font family (e.g., "roboto-flex"). |
| weight | The weight of the font (e.g., 400 for normal, 700 for bold). |
| isItalic | Whether the font is italic. |
Properties
name
override val name: String = fontName
Functions
equals
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
Style
public enum class Style {
Normal,
Bold,
Italic,
BoldItalic,
}
Represents the style of a RemoteTypeface (e.g., Normal, Bold, Italic).
Members
Normal
Normal
Bold
Bold
Italic
Italic
BoldItalic
BoldItalic
Companion
public companion object
Functions
create
public fun create(fontName: String?, style: Style = Style.Normal): RemoteTypeface
Creates a RemoteTypeface with the given fontName and style.
Parameters
| fontName | The font family name, or null for the default font. |
| style | The Style of the typeface. |