mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 16:55:26 +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.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import com.sadellie.unitto.R
|
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),
|
text = if (showAppName) stringResource(R.string.app_name) else stringResource(R.string.hello_label),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
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 androidx.compose.ui.unit.sp
|
||||||
import com.sadellie.unitto.R
|
import com.sadellie.unitto.R
|
||||||
|
|
||||||
private val OPEN_SANS_FONT = FontFamily(
|
private val Montserrat = FontFamily(
|
||||||
Font(R.font.opensans_regular, weight = FontWeight.W400),
|
Font(R.font.montserrat_light, weight = FontWeight.Light),
|
||||||
Font(R.font.opensans_medium, weight = FontWeight.Medium)
|
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)
|
Font(R.font.lato_regular)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This text style is used for text field
|
// This text style is used for text field
|
||||||
val NumbersTextStyleDisplayLarge = TextStyle(
|
val NumbersTextStyleDisplayLarge = TextStyle(
|
||||||
fontFamily = LATO_FONT,
|
fontFamily = Lato,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 57.sp,
|
fontSize = 57.sp,
|
||||||
lineHeight = 64.sp,
|
lineHeight = 64.sp,
|
||||||
@ -46,7 +48,7 @@ val NumbersTextStyleDisplayLarge = TextStyle(
|
|||||||
|
|
||||||
// This text style is used for secondary text field
|
// This text style is used for secondary text field
|
||||||
val NumbersTextStyleDisplayMedium = TextStyle(
|
val NumbersTextStyleDisplayMedium = TextStyle(
|
||||||
fontFamily = LATO_FONT,
|
fontFamily = Lato,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 38.sp,
|
fontSize = 38.sp,
|
||||||
lineHeight = 42.sp,
|
lineHeight = 42.sp,
|
||||||
@ -55,7 +57,7 @@ val NumbersTextStyleDisplayMedium = TextStyle(
|
|||||||
|
|
||||||
// This text style is used for keyboard button
|
// This text style is used for keyboard button
|
||||||
val NumbersTextStyleTitleLarge = TextStyle(
|
val NumbersTextStyleTitleLarge = TextStyle(
|
||||||
fontFamily = LATO_FONT,
|
fontFamily = Lato,
|
||||||
fontWeight = FontWeight.W600,
|
fontWeight = FontWeight.W600,
|
||||||
fontSize = 26.sp,
|
fontSize = 26.sp,
|
||||||
lineHeight = 32.sp,
|
lineHeight = 32.sp,
|
||||||
@ -64,108 +66,108 @@ val NumbersTextStyleTitleLarge = TextStyle(
|
|||||||
|
|
||||||
val AppTypography = Typography(
|
val AppTypography = Typography(
|
||||||
displayLarge = TextStyle(
|
displayLarge = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 57.sp,
|
fontSize = 57.sp,
|
||||||
lineHeight = 64.sp,
|
lineHeight = 64.sp,
|
||||||
letterSpacing = (-0.25).sp,
|
letterSpacing = (-0.25).sp,
|
||||||
),
|
),
|
||||||
displayMedium = TextStyle(
|
displayMedium = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 45.sp,
|
fontSize = 45.sp,
|
||||||
lineHeight = 52.sp,
|
lineHeight = 52.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
displaySmall = TextStyle(
|
displaySmall = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 36.sp,
|
fontSize = 36.sp,
|
||||||
lineHeight = 44.sp,
|
lineHeight = 44.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
headlineLarge = TextStyle(
|
headlineLarge = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 32.sp,
|
fontSize = 32.sp,
|
||||||
lineHeight = 40.sp,
|
lineHeight = 40.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
headlineMedium = TextStyle(
|
headlineMedium = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 28.sp,
|
fontSize = 28.sp,
|
||||||
lineHeight = 36.sp,
|
lineHeight = 36.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
headlineSmall = TextStyle(
|
headlineSmall = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 24.sp,
|
fontSize = 24.sp,
|
||||||
lineHeight = 32.sp,
|
lineHeight = 32.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
titleLarge = TextStyle(
|
titleLarge = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 22.sp,
|
fontSize = 22.sp,
|
||||||
lineHeight = 28.sp,
|
lineHeight = 28.sp,
|
||||||
letterSpacing = 0.sp,
|
letterSpacing = 0.sp,
|
||||||
),
|
),
|
||||||
titleMedium = TextStyle(
|
titleMedium = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 16.sp,
|
fontSize = 18.sp,
|
||||||
lineHeight = 24.sp,
|
lineHeight = 24.sp,
|
||||||
letterSpacing = 0.1.sp,
|
letterSpacing = 0.1.sp,
|
||||||
),
|
),
|
||||||
titleSmall = TextStyle(
|
titleSmall = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.Medium,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
lineHeight = 20.sp,
|
|
||||||
letterSpacing = 0.1.sp,
|
|
||||||
),
|
|
||||||
labelLarge = TextStyle(
|
|
||||||
fontFamily = OPEN_SANS_FONT,
|
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
lineHeight = 20.sp,
|
lineHeight = 20.sp,
|
||||||
letterSpacing = 0.1.sp,
|
letterSpacing = 0.1.sp,
|
||||||
),
|
),
|
||||||
bodyLarge = TextStyle(
|
bodyLarge = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
lineHeight = 24.sp,
|
lineHeight = 24.sp,
|
||||||
letterSpacing = 0.5.sp,
|
letterSpacing = 0.5.sp,
|
||||||
),
|
),
|
||||||
bodyMedium = TextStyle(
|
bodyMedium = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
lineHeight = 20.sp,
|
lineHeight = 20.sp,
|
||||||
letterSpacing = 0.25.sp,
|
letterSpacing = 0.25.sp,
|
||||||
),
|
),
|
||||||
bodySmall = TextStyle(
|
bodySmall = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 16.sp,
|
lineHeight = 16.sp,
|
||||||
letterSpacing = 0.4.sp,
|
letterSpacing = 0.4.sp,
|
||||||
),
|
),
|
||||||
|
labelLarge = TextStyle(
|
||||||
|
fontFamily = Montserrat,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 14.sp,
|
||||||
|
lineHeight = 20.sp,
|
||||||
|
letterSpacing = 0.1.sp,
|
||||||
|
),
|
||||||
labelMedium = TextStyle(
|
labelMedium = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 16.sp,
|
lineHeight = 16.sp,
|
||||||
letterSpacing = 0.5.sp,
|
letterSpacing = 0.5.sp,
|
||||||
),
|
),
|
||||||
labelSmall = TextStyle(
|
labelSmall = TextStyle(
|
||||||
fontFamily = OPEN_SANS_FONT,
|
fontFamily = Montserrat,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 11.sp,
|
fontSize = 10.sp,
|
||||||
lineHeight = 16.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