mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-09 12:58:43 +01:00
chore: remove unnecessary font (#785)
This commit is contained in:
parent
66f62bad59
commit
0f7ff3e5a0
@ -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
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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),
|
||||
)
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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(
|
||||
|
@ -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,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user