Skip to content

Commit d4c97bb

Browse files
authored
[Paywalls V2] Remove cursive as a generic font (#2118)
### Motivation Remove `cursive` as a generic font to match with what is possible with other platforms (iOS) ### Description (Above)
1 parent 18914df commit d4c97bb

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/properties/FontSpec.kt

-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ internal sealed interface FontSpec {
4444
object SansSerif : Generic
4545
object Serif : Generic
4646
object Monospace : Generic
47-
object Cursive : Generic
4847
}
4948

5049
data class System(@get:JvmSynthetic val name: String) : FontSpec
@@ -85,7 +84,6 @@ internal fun FontSpec.resolve(
8584
FontSpec.Generic.SansSerif -> FontFamily.SansSerif
8685
FontSpec.Generic.Serif -> FontFamily.Serif
8786
FontSpec.Generic.Monospace -> FontFamily.Monospace
88-
FontSpec.Generic.Cursive -> FontFamily.Cursive
8987
}
9088

9189
is FontSpec.System -> FontFamily(
@@ -100,7 +98,6 @@ private fun ResourceProvider.determineFontSpec(info: FontInfo): FontSpec =
10098
FontFamily.SansSerif.name -> FontSpec.Generic.SansSerif
10199
FontFamily.Serif.name -> FontSpec.Generic.Serif
102100
FontFamily.Monospace.name -> FontSpec.Generic.Monospace
103-
FontFamily.Cursive.name -> FontSpec.Generic.Cursive
104101
else -> {
105102
@SuppressLint("DiscouragedApi")
106103
val fontId = getResourceIdentifier(name = info.value, type = "font")

ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/text/TextComponentView.kt

-14
Original file line numberDiff line numberDiff line change
@@ -237,20 +237,6 @@ private fun TextComponentView_Preview_MonospaceFont() {
237237
)
238238
}
239239

240-
@Preview(name = "CursiveFont")
241-
@Composable
242-
private fun TextComponentView_Preview_CursiveFont() {
243-
TextComponentView(
244-
style = previewTextComponentStyle(
245-
text = "Hello, world",
246-
color = ColorStyles(light = ColorStyle.Solid(Color.Black)),
247-
fontSpec = FontSpec.Generic.Cursive,
248-
size = Size(width = Fit, height = Fit),
249-
),
250-
state = previewEmptyState(),
251-
)
252-
}
253-
254240
@Preview
255241
@Composable
256242
private fun TextComponentView_Preview_FontSize() {

0 commit comments

Comments
 (0)