Giorgi
10/09/2024, 7:51 PMGiorgi
10/09/2024, 7:51 PM@Composable
@Preview
fun App() {
MaterialTheme {
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = "Click me!",
modifier = Modifier.border(2.dp, Color.Red),
lineHeight = 44.sp // This does works
)
Text(
text = "Click me!",
modifier = Modifier.border(2.dp, Color.Red),
lineHeight = 44.sp,
style = TextStyle(
fontFamily = FontFamily(Font(Res.font.Inter_VariableFont_opsz_wght)),
// fontSize = 12.sp,
lineHeight = 44.sp, // This does not work
)
)
Text(
text = "Click me!",
modifier = Modifier.border(2.dp, Color.Red),
lineHeight = 44.sp,
style = TextStyle(
fontFamily = FontFamily(Font(Res.font.Inter_24pt_Regular)),
fontSize = 22.sp,
lineHeight = 44.sp,
)
)
Text("Click me! Click me! Click me!")
Text("Click me!")
}
}
}
Giorgi
10/09/2024, 7:52 PMGiorgi
10/10/2024, 6:37 PMlineHeightStyle = LineHeightStyle(
LineHeightStyle.Alignment.Center,
trim = LineHeightStyle.Trim.None
)