chore: remove unnecessary font (#785)

This commit is contained in:
Diego Beraldin 2024-05-04 22:59:34 +02:00 committed by GitHub
parent 66f62bad59
commit 0f7ff3e5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 1 additions and 18 deletions

View File

@ -8,14 +8,12 @@ enum class UiFontFamily {
NotoSans,
CharisSIL,
Poppins,
Comfortaa,
}
fun Int.toUiFontFamily() = when (this) {
0 -> UiFontFamily.Poppins
3 -> UiFontFamily.NotoSans
4 -> UiFontFamily.CharisSIL
5 -> UiFontFamily.Comfortaa
else -> UiFontFamily.Default
}
@ -23,7 +21,6 @@ fun UiFontFamily.toInt() = when (this) {
UiFontFamily.Poppins -> 0
UiFontFamily.NotoSans -> 3
UiFontFamily.CharisSIL -> 4
UiFontFamily.Comfortaa -> 5
UiFontFamily.Default -> 7
}
@ -32,6 +29,5 @@ fun UiFontFamily.toReadableName() = when (this) {
UiFontFamily.Poppins -> "Poppins"
UiFontFamily.NotoSans -> "Noto Sans"
UiFontFamily.CharisSIL -> "Charis SIL"
UiFontFamily.Comfortaa -> "Comfortaa"
UiFontFamily.Default -> LocalXmlStrings.current.settingsFontFamilyDefault
}

View File

@ -17,7 +17,6 @@ fun UiFontFamily.toTypography(): Typography {
UiFontFamily.NotoSans -> coreResources.notoSans
UiFontFamily.CharisSIL -> coreResources.charisSil
UiFontFamily.Poppins -> coreResources.poppins
UiFontFamily.Comfortaa -> coreResources.comfortaa
else -> FontFamily.Default
}
return Typography(

View File

@ -12,5 +12,4 @@ interface CoreResources {
val notoSans: FontFamily @Composable get
val poppins: FontFamily @Composable get
val charisSil: FontFamily @Composable get
val comfortaa: FontFamily @Composable get
}

View File

@ -49,13 +49,4 @@ internal class DefaultCoreResources : CoreResources {
font("CharisSIL", "charissil_bold", FontWeight.Bold, FontStyle.Normal),
font("CharisSIL", "charissil_italic", FontWeight.Normal, FontStyle.Italic),
)
override val comfortaa: FontFamily
@Composable
get() = FontFamily(
font("Comfortaa", "comfortaa_regular", FontWeight.Normal, FontStyle.Normal),
font("Comfortaa", "comfortaa_bold", FontWeight.Bold, FontStyle.Normal),
font("Comfortaa", "comfortaa_medium", FontWeight.Medium, FontStyle.Normal),
font("Comfortaa", "comfortaa_light", FontWeight.Light, FontStyle.Normal),
)
}

View File

@ -31,7 +31,6 @@ private val defaultChoices: List<Int> = listOf(
UiFontFamily.Poppins,
UiFontFamily.NotoSans,
UiFontFamily.CharisSIL,
UiFontFamily.Comfortaa,
UiFontFamily.Default,
).map { it.toInt() }
@ -87,7 +86,6 @@ class FontFamilyBottomSheet(
UiFontFamily.NotoSans -> coreResources.notoSans
UiFontFamily.CharisSIL -> coreResources.charisSil
UiFontFamily.Poppins -> coreResources.poppins
UiFontFamily.Comfortaa -> coreResources.comfortaa
else -> FontFamily.Default
}
Text(

View File

@ -19,7 +19,7 @@ class LicencesViewModel : LicencesMviModel,
items = buildList {
this += LicenceItem(
type = LicenceItemType.Resource,
title = "Charis SIL, Comfortaa, Noto Sans, Poppins",
title = "Charis SIL, Noto Sans, Poppins",
subtitle = "Fonts used in the app are released under the Open Font Library (OFL)",
url = LicenceUrls.OFL,
)