SkapaTypeScale
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.
See also
Samples
SkapaTheme2(
darkTheme = isSystemInDarkTheme(),
fontFamily = NotoIkeaLatin, // Add your desired font family
typeScale = SkapaTypeScale.SmallScreen, // Select the desired type scale depending on what size device you are designing for
baseFontSize = 14.sp // Add your desired base font size, increasing will scale all typesets accordingly
) {
Column {
Text(
text = "Skapa Display M",
style = SkapaTheme.typography.displayM
)
Text(
text = "Skapa heading M",
style = SkapaTheme.typography.headingM,
modifier = Modifier.semantics { heading() }
)
Text(
text = "Skapa statement M",
style = SkapaTheme.typography.statementM
)
Text(
text = "Skapa body M",
style = SkapaTheme.typography.bodyM
)
Text(
text = "Skapa label M",
style = SkapaTheme.typography.labelM
)
Text(
text = "Skapa caption M",
style = SkapaTheme.typography.captionM
)
}
}Entries
Represents an automatic mode that will determine the mode based on the screen size. We use the system information to switch between SmallScreen and Desktop depending on the devices DP width. The breakpoint is set to 840.dp and is meant for larger tablets. Auto will not set LargeScreen at any point and will need to be done manually if that scaling is desired.
Represents small screens such as mobile phones, from 4 to 9 inches in screen size.
Represents larger screens such as large computer monitors and TV screens, from 32 inches in screen size and upwards.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.