Typography: explicit line heights on every tier so body text stops reading as a dense wall

This commit is contained in:
avi 2026-09-21 11:29:48 -05:00
commit a6e1d30f92

View file

@ -91,31 +91,44 @@ private val ShonarShapes = Shapes(
// Typography hierarchy per the reference: page title 22/700 wide // Typography hierarchy per the reference: page title 22/700 wide
// tracking; section 16/600; item title 15/600; body 14; metadata 13 // tracking; section 16/600; item title 15/600; body 14; metadata 13
// muted; labels 12–13. // muted; labels 12–13. Line heights are explicit everywhere: the
// summary is the product's reading surface and 1.0 leading read as a
// dense wall; each tier now separates by size AND rhythm, not weight
// alone.
private val ShonarTypography = Typography( private val ShonarTypography = Typography(
headlineSmall = TextStyle( headlineSmall = TextStyle(
fontSize = 22.sp, fontWeight = FontWeight.Bold, fontSize = 22.sp, fontWeight = FontWeight.Bold,
letterSpacing = 0.5.sp, color = Shonar.TextPrimary, letterSpacing = 0.5.sp, lineHeight = 28.sp,
color = Shonar.TextPrimary,
), ),
titleMedium = TextStyle( titleMedium = TextStyle(
fontSize = 16.sp, fontWeight = FontWeight.SemiBold, fontSize = 17.sp, fontWeight = FontWeight.SemiBold,
color = Shonar.TextPrimary, lineHeight = 24.sp, color = Shonar.TextPrimary,
), ),
titleSmall = TextStyle( titleSmall = TextStyle(
fontSize = 15.sp, fontWeight = FontWeight.SemiBold, fontSize = 15.sp, fontWeight = FontWeight.SemiBold,
letterSpacing = 0.2.sp, lineHeight = 22.sp,
color = Shonar.TextPrimary, color = Shonar.TextPrimary,
), ),
bodyLarge = TextStyle(fontSize = 15.sp, color = Shonar.TextPrimary), bodyLarge = TextStyle(
bodyMedium = TextStyle(fontSize = 14.sp, color = Shonar.TextPrimary), fontSize = 16.sp, lineHeight = 25.sp, color = Shonar.TextPrimary,
bodySmall = TextStyle(fontSize = 13.sp, color = Shonar.TextSecondary), ),
bodyMedium = TextStyle(
fontSize = 14.sp, lineHeight = 21.sp, color = Shonar.TextPrimary,
),
bodySmall = TextStyle(
fontSize = 13.sp, lineHeight = 18.sp, color = Shonar.TextSecondary,
),
labelLarge = TextStyle( labelLarge = TextStyle(
fontSize = 14.sp, fontWeight = FontWeight.Medium, fontSize = 14.sp, fontWeight = FontWeight.Medium, lineHeight = 18.sp,
), ),
labelMedium = TextStyle( labelMedium = TextStyle(
fontSize = 13.sp, fontWeight = FontWeight.Medium, fontSize = 13.sp, fontWeight = FontWeight.Medium, lineHeight = 17.sp,
color = Shonar.TextSecondary, color = Shonar.TextSecondary,
), ),
labelSmall = TextStyle(fontSize = 12.sp, color = Shonar.TextMuted), labelSmall = TextStyle(
fontSize = 12.sp, lineHeight = 16.sp, color = Shonar.TextMuted,
),
) )
private val ShonarDarkScheme = darkColorScheme( private val ShonarDarkScheme = darkColorScheme(