Class

Typography

Class holding typography definitions as defined by the Wear Material typography specification.

FixedFontSize

@Composable
fun FixedFontSize() {
    val typography =
        MaterialTheme.typography.copy(
            display1 =
                MaterialTheme.typography.display1.copy(
                    fontSize = with(LocalDensity.current) { 40.dp.toSp() }
                )
        )
    MaterialTheme(typography = typography) {
        Text(
            text = "Fixed Font",
            maxLines = 1,
            style = MaterialTheme.typography.display1,
            color = MaterialTheme.colors.onBackground,
        )
    }
}