Sankar V
07/13/2024, 3:15 PMworks
- Setting Line Height larger than the default
val Typography.Heading2: TextStyle
get() = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 24.sp,
lineHeight = 30.sp, // Default line height - 24*1.2 = 28.8
letterSpacing = 0.48.sp
)
this doesn't work
- Setting Line Height smaller than the default
val Typography.Heading2: TextStyle
get() = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 24.sp,
lineHeight = 24.sp, // Default line height - 24*1.2 = 28.8
letterSpacing = 0.48.sp
)
Any idea how to set a smaller line height than the default line height?M Saif Ullah
07/14/2024, 9:51 AMM Saif Ullah
07/14/2024, 9:52 AMstyle = MaterialTheme.typography.labelLarge.copy(lineHeight = 8.sp)
Sankar V
07/15/2024, 8:11 AMFontFamily.Default
Sankar V
07/15/2024, 8:11 AMSankar V
07/15/2024, 8:12 AMSankar V
07/15/2024, 8:14 AMSankar V
07/15/2024, 8:16 AM8.sp
Sankar V
07/16/2024, 10:24 AM