style: add custom fonts typography
This commit is contained in:
parent
60f55e031a
commit
b1a4d07a87
5 changed files with 60 additions and 7 deletions
|
@ -1,7 +1,9 @@
|
|||
package xyz.leomurca.csgomatches.ui.main
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
|
@ -11,7 +13,7 @@ import androidx.compose.ui.unit.sp
|
|||
@Composable
|
||||
fun MainScreen() {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
modifier = Modifier.fillMaxSize().background(MaterialTheme.colorScheme.background),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text("Main Screen", fontSize = 24.sp)
|
||||
|
|
|
@ -2,16 +2,67 @@ package xyz.leomurca.csgomatches.ui.theme
|
|||
|
||||
import androidx.compose.material3.Typography
|
||||
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.FontWeight
|
||||
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(
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = robotoFontFamily,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 40.sp,
|
||||
letterSpacing = 0.sp
|
||||
), // Partidas
|
||||
titleMedium = TextStyle(
|
||||
fontFamily = robotoFontFamily,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 18.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
|
||||
)
|
BIN
app/src/main/res/font/roboto_bold.ttf
Normal file
BIN
app/src/main/res/font/roboto_bold.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/roboto_medium.ttf
Normal file
BIN
app/src/main/res/font/roboto_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/roboto_regular.ttf
Normal file
BIN
app/src/main/res/font/roboto_regular.ttf
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue