Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Paywalls V2] Remove cursive as a generic font #2118

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ internal sealed interface FontSpec {
object SansSerif : Generic
object Serif : Generic
object Monospace : Generic
object Cursive : Generic
}

data class System(@get:JvmSynthetic val name: String) : FontSpec
Expand Down Expand Up @@ -85,7 +84,6 @@ internal fun FontSpec.resolve(
FontSpec.Generic.SansSerif -> FontFamily.SansSerif
FontSpec.Generic.Serif -> FontFamily.Serif
FontSpec.Generic.Monospace -> FontFamily.Monospace
FontSpec.Generic.Cursive -> FontFamily.Cursive
}

is FontSpec.System -> FontFamily(
Expand All @@ -100,7 +98,6 @@ private fun ResourceProvider.determineFontSpec(info: FontInfo): FontSpec =
FontFamily.SansSerif.name -> FontSpec.Generic.SansSerif
FontFamily.Serif.name -> FontSpec.Generic.Serif
FontFamily.Monospace.name -> FontSpec.Generic.Monospace
FontFamily.Cursive.name -> FontSpec.Generic.Cursive
else -> {
@SuppressLint("DiscouragedApi")
val fontId = getResourceIdentifier(name = info.value, type = "font")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,6 @@ private fun TextComponentView_Preview_MonospaceFont() {
)
}

@Preview(name = "CursiveFont")
@Composable
private fun TextComponentView_Preview_CursiveFont() {
TextComponentView(
style = previewTextComponentStyle(
text = "Hello, world",
color = ColorStyles(light = ColorStyle.Solid(Color.Black)),
fontSpec = FontSpec.Generic.Cursive,
size = Size(width = Fit, height = Fit),
),
state = previewEmptyState(),
)
}

@Preview
@Composable
private fun TextComponentView_Preview_FontSize() {
Expand Down