mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Updated font
Montserrat good, Open Sans bad.
This commit is contained in:
parent
2ffa9f43a2
commit
d715bc61fa
@ -29,7 +29,6 @@ import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import com.sadellie.unitto.R
|
||||
|
||||
@ -52,7 +51,7 @@ fun AnimatedTopBarText(showAppName: Boolean) {
|
||||
text = if (showAppName) stringResource(R.string.app_name) else stringResource(R.string.hello_label),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
style = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.W600)
|
||||
style = MaterialTheme.typography.titleLarge
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -26,18 +26,20 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.sadellie.unitto.R
|
||||
|
||||
private val OPEN_SANS_FONT = FontFamily(
|
||||
Font(R.font.opensans_regular, weight = FontWeight.W400),
|
||||
Font(R.font.opensans_medium, weight = FontWeight.Medium)
|
||||
private val Montserrat = FontFamily(
|
||||
Font(R.font.montserrat_light, weight = FontWeight.Light),
|
||||
Font(R.font.montserrat_regular, weight = FontWeight.Normal),
|
||||
Font(R.font.montserrat_medium, weight = FontWeight.Medium),
|
||||
Font(R.font.montserrat_semibold, weight = FontWeight.SemiBold),
|
||||
)
|
||||
|
||||
private val LATO_FONT = FontFamily(
|
||||
private val Lato = FontFamily(
|
||||
Font(R.font.lato_regular)
|
||||
)
|
||||
|
||||
// This text style is used for text field
|
||||
val NumbersTextStyleDisplayLarge = TextStyle(
|
||||
fontFamily = LATO_FONT,
|
||||
fontFamily = Lato,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontSize = 57.sp,
|
||||
lineHeight = 64.sp,
|
||||
@ -46,7 +48,7 @@ val NumbersTextStyleDisplayLarge = TextStyle(
|
||||
|
||||
// This text style is used for secondary text field
|
||||
val NumbersTextStyleDisplayMedium = TextStyle(
|
||||
fontFamily = LATO_FONT,
|
||||
fontFamily = Lato,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontSize = 38.sp,
|
||||
lineHeight = 42.sp,
|
||||
@ -55,7 +57,7 @@ val NumbersTextStyleDisplayMedium = TextStyle(
|
||||
|
||||
// This text style is used for keyboard button
|
||||
val NumbersTextStyleTitleLarge = TextStyle(
|
||||
fontFamily = LATO_FONT,
|
||||
fontFamily = Lato,
|
||||
fontWeight = FontWeight.W600,
|
||||
fontSize = 26.sp,
|
||||
lineHeight = 32.sp,
|
||||
@ -64,108 +66,108 @@ val NumbersTextStyleTitleLarge = TextStyle(
|
||||
|
||||
val AppTypography = Typography(
|
||||
displayLarge = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 57.sp,
|
||||
lineHeight = 64.sp,
|
||||
letterSpacing = (-0.25).sp,
|
||||
),
|
||||
displayMedium = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 45.sp,
|
||||
lineHeight = 52.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
displaySmall = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 36.sp,
|
||||
lineHeight = 44.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
headlineLarge = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 40.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
headlineMedium = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 28.sp,
|
||||
lineHeight = 36.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
headlineSmall = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 24.sp,
|
||||
lineHeight = 32.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 22.sp,
|
||||
lineHeight = 28.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
titleMedium = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 16.sp,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 18.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.1.sp,
|
||||
),
|
||||
titleSmall = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
letterSpacing = 0.1.sp,
|
||||
),
|
||||
labelLarge = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
letterSpacing = 0.1.sp,
|
||||
),
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp,
|
||||
),
|
||||
bodyMedium = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
letterSpacing = 0.25.sp,
|
||||
),
|
||||
bodySmall = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontWeight = FontWeight.W400,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
letterSpacing = 0.4.sp,
|
||||
),
|
||||
labelLarge = TextStyle(
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
letterSpacing = 0.1.sp,
|
||||
),
|
||||
labelMedium = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
letterSpacing = 0.5.sp,
|
||||
),
|
||||
labelSmall = TextStyle(
|
||||
fontFamily = OPEN_SANS_FONT,
|
||||
fontFamily = Montserrat,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 11.sp,
|
||||
fontSize = 10.sp,
|
||||
lineHeight = 16.sp,
|
||||
letterSpacing = 0.5.sp,
|
||||
letterSpacing = 0.sp,
|
||||
),
|
||||
)
|
||||
|
BIN
app/src/main/res/font/montserrat_light.ttf
Normal file
BIN
app/src/main/res/font/montserrat_light.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/montserrat_medium.ttf
Normal file
BIN
app/src/main/res/font/montserrat_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/montserrat_regular.ttf
Normal file
BIN
app/src/main/res/font/montserrat_regular.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/montserrat_semibold.ttf
Normal file
BIN
app/src/main/res/font/montserrat_semibold.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user