Package-level declarations

Types

Link copied to clipboard

Enum representing the different modes for the Skapa typography system. The mode effects the follow text styles: Display, Heading, and Statement and will give new type scale values depending on what mode is used. The default mode is SkapaTypeScale.SmallScreen.

Link copied to clipboard

Represents the complete set of typography styles in the Skapa typography system.

Link copied to clipboard

Functions

Link copied to clipboard
fun calculateLetterSpacing(rebasedFontSize: TextUnit, baseFontSize: TextUnit, fontWeight: FontWeight, fontFamily: FontFamily, extraLetterSpacing: Boolean): TextUnit

Shared letter spacing calculation used by createTextStyle.

Link copied to clipboard
fun createTextStyle(fontSize: TextUnit, baseFontSize: TextUnit, color: Color, lineHeightMultiplier: Double, fontFamily: FontFamily, fontWeight: FontWeight, extraLetterSpacing: Boolean = true): TextStyle

Creates a Skapa TextStyle with the given parameters. Used to create the typography text styles.

Link copied to clipboard
fun getRebasedFontSize(fontSize: TextUnit, baseFontSize: TextUnit): TextUnit

Helper functions, to calculate the font size based on the base font size.