style: add custom fonts typography

This commit is contained in:
Leonardo Murça 2025-07-17 18:35:08 -03:00
parent 60f55e031a
commit b1a4d07a87
5 changed files with 60 additions and 7 deletions

View file

@ -1,7 +1,9 @@
package xyz.leomurca.csgomatches.ui.main package xyz.leomurca.csgomatches.ui.main
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
@ -11,7 +13,7 @@ import androidx.compose.ui.unit.sp
@Composable @Composable
fun MainScreen() { fun MainScreen() {
Box( Box(
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize().background(MaterialTheme.colorScheme.background),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
Text("Main Screen", fontSize = 24.sp) Text("Main Screen", fontSize = 24.sp)

View file

@ -2,16 +2,67 @@ package xyz.leomurca.csgomatches.ui.theme
import androidx.compose.material3.Typography import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import xyz.leomurca.csgomatches.R
private val robotoFontFamily = FontFamily(
Font(R.font.roboto_regular, FontWeight.Normal),
Font(R.font.roboto_medium, FontWeight.Medium),
Font(R.font.roboto_bold, FontWeight.Bold)
)
val Typography = Typography( val Typography = Typography(
bodyLarge = TextStyle( titleLarge = TextStyle(
fontFamily = FontFamily.Default, fontFamily = robotoFontFamily,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Medium,
fontSize = 16.sp, fontSize = 32.sp,
lineHeight = 40.sp,
letterSpacing = 0.sp
), // Partidas
titleMedium = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Medium,
fontSize = 18.sp,
lineHeight = 24.sp, lineHeight = 24.sp,
letterSpacing = 0.5.sp letterSpacing = 0.sp
) ), // League + serie (no topo)
labelSmall = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Normal,
fontSize = 8.sp,
lineHeight = 8.sp,
letterSpacing = 0.sp
), // League + serie (em baixo do card)
labelMedium = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Normal,
fontSize = 10.sp,
lineHeight = 10.sp,
letterSpacing = 0.sp
), // Time 1
bodyMedium = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Normal,
fontSize = 12.sp,
lineHeight = 12.sp,
letterSpacing = 0.sp,
), // vs
headlineMedium = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Bold,
fontSize = 12.sp,
lineHeight = 12.sp,
letterSpacing = 0.sp,
), // Hoje, 21:00
headlineLarge = TextStyle(
fontFamily = robotoFontFamily,
fontWeight = FontWeight.Bold,
fontSize = 14.sp,
lineHeight = 14.sp,
letterSpacing = 0.sp,
), // Nickname
) )

Binary file not shown.

Binary file not shown.

Binary file not shown.