FontSpec

data class FontSpec(val fontSize: Double, val lineHeight: Double)

A platform-agnostic text style/font token declaring target font size and line height. These are compiled to standard Android text appearances and Apple system fonts.

Constructors

Link copied to clipboard
constructor(fontSize: Double, lineHeight: Double)

Properties

Link copied to clipboard

The text size in sp/points.

Link copied to clipboard

The line height in sp/points.

Functions

Link copied to clipboard
fun FontSpec.toTextStyle(fontWeight: FontWeight = FontWeight.Normal): TextStyle

Converts this FontSpec into a Compose TextStyle.

Link copied to clipboard
fun FontSpec.toUIFont(isBold: Boolean = false): UIFont

Converts this platform-agnostic FontSpec into a native iOS UIFont.