Cotton code
47 lines · 2.0 KB · KotlinRaw
package com.cottondb.android.designimport androidx.compose.material3.Typographyimport androidx.compose.ui.text.TextStyleimport androidx.compose.ui.text.font.FontFamilyimport androidx.compose.ui.text.font.FontWeightimport androidx.compose.ui.unit.sp/** * The phone's ten system-face roles from CottonPaper/Typography.swift. * Object lettering is supplied separately by [CottonFonts]. */object CottonTextStyles {    val pageTitle = TextStyle(fontSize = 34.sp, lineHeight = 41.sp, fontWeight = FontWeight.Bold)    val editorTitle = TextStyle(fontSize = 30.sp, lineHeight = 37.sp, fontWeight = FontWeight.SemiBold)    val screenTitle = TextStyle(fontSize = 20.sp, lineHeight = 25.sp, fontWeight = FontWeight.SemiBold)    val rowTitle = TextStyle(fontSize = 20.sp, lineHeight = 25.sp, fontWeight = FontWeight.Medium)    val rowTitleCompact = TextStyle(fontSize = 17.sp, lineHeight = 22.sp, fontWeight = FontWeight.Medium)    val body = TextStyle(fontSize = 16.sp, lineHeight = 22.sp, fontWeight = FontWeight.Normal)    val preview = TextStyle(fontSize = 15.sp, lineHeight = 20.sp, fontWeight = FontWeight.Normal)    val caption = TextStyle(fontSize = 13.sp, lineHeight = 18.sp, fontWeight = FontWeight.Normal)    val sectionLabel = TextStyle(        fontSize = 13.sp,        lineHeight = 18.sp,        fontWeight = FontWeight.SemiBold,        letterSpacing = 0.8.sp,    )    val code = TextStyle(        fontSize = 12.sp,        lineHeight = 17.sp,        fontWeight = FontWeight.Normal,        fontFamily = FontFamily.Monospace,    )}val CottonTypography = Typography(    displayLarge = CottonTextStyles.pageTitle,    headlineLarge = CottonTextStyles.editorTitle,    headlineSmall = CottonTextStyles.screenTitle,    titleLarge = CottonTextStyles.rowTitle,    titleMedium = CottonTextStyles.rowTitleCompact,    bodyLarge = CottonTextStyles.body,    bodyMedium = CottonTextStyles.preview,    bodySmall = CottonTextStyles.caption,    labelLarge = CottonTextStyles.sectionLabel,    labelSmall = CottonTextStyles.code,)