Modern Apps git

← Modern-Apps.git

theme: revert Google Sans Flex; use system default font

Commit
36c4efe990bd63e06bce4940fe4caeafc73c88f9
Author
vayun-mathur <[email protected]>
When
2026-08-16 03:11 UTC (3 months ago)
Parents
a627c01

Diff

library/ui/src/main/java/com/vayunmathur/library/ui/DynamicTheme.kt
diff --git a/library/ui/src/main/java/com/vayunmathur/library/ui/DynamicTheme.kt b/library/ui/src/main/java/com/vayunmathur/library/ui/DynamicTheme.ktindex 423328cb99..fa3e41ea9e 100644--- a/library/ui/src/main/java/com/vayunmathur/library/ui/DynamicTheme.kt+++ b/library/ui/src/main/java/com/vayunmathur/library/ui/DynamicTheme.kt@@ -2,6 +2,7 @@ package com.vayunmathur.library.ui  import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme+import androidx.compose.material3.Typography import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme import androidx.compose.runtime.Composable@@ -14,7 +15,7 @@ fun DynamicTheme(darkTheme: Boolean? = null, content: @Composable () -> Unit) {      MaterialTheme(         colorScheme = colorScheme,-        typography = AppTypography,+        typography = Typography(),         content = content     ) }
library/ui/src/main/java/com/vayunmathur/library/ui/Type.kt
diff --git a/library/ui/src/main/java/com/vayunmathur/library/ui/Type.kt b/library/ui/src/main/java/com/vayunmathur/library/ui/Type.ktdeleted file mode 100644index 2cd9f77fdb..0000000000--- a/library/ui/src/main/java/com/vayunmathur/library/ui/Type.kt+++ /dev/null@@ -1,55 +0,0 @@-package com.vayunmathur.library.ui--import androidx.compose.material3.Typography-import androidx.compose.ui.text.font.Font-import androidx.compose.ui.text.font.FontFamily-import androidx.compose.ui.text.font.FontVariation-import androidx.compose.ui.text.font.FontWeight--/**- * Google Sans Flex — the app suite's brand typeface.- *- * Applied to every Material text style via [AppTypography] so the UI always- * renders in Google Sans Flex and ignores the user's system font choice. Backed- * by the single variable font (`res/font/google_sans_flex.ttf`); each weight is- * a [FontVariation] on the `wght` axis (minSdk 31, so variable fonts are fully- * supported).- *- * Monospace / code contexts are intentionally NOT affected: editors and inline- * code set [FontFamily.Monospace] explicitly rather than reading the theme- * [Typography], so they keep a fixed-width face.- */-private fun googleSansFlex(weight: FontWeight): Font = Font(-    resId = R.font.google_sans_flex,-    weight = weight,-    variationSettings = FontVariation.Settings(FontVariation.weight(weight.weight)),-)--val GoogleSansFlex: FontFamily = FontFamily(-    googleSansFlex(FontWeight.Light),-    googleSansFlex(FontWeight.Normal),-    googleSansFlex(FontWeight.Medium),-    googleSansFlex(FontWeight.SemiBold),-    googleSansFlex(FontWeight.Bold),-)--/** The default Material 3 [Typography] with every style forced to [GoogleSansFlex]. */-val AppTypography: Typography = Typography().run {-    Typography(-        displayLarge = displayLarge.copy(fontFamily = GoogleSansFlex),-        displayMedium = displayMedium.copy(fontFamily = GoogleSansFlex),-        displaySmall = displaySmall.copy(fontFamily = GoogleSansFlex),-        headlineLarge = headlineLarge.copy(fontFamily = GoogleSansFlex),-        headlineMedium = headlineMedium.copy(fontFamily = GoogleSansFlex),-        headlineSmall = headlineSmall.copy(fontFamily = GoogleSansFlex),-        titleLarge = titleLarge.copy(fontFamily = GoogleSansFlex),-        titleMedium = titleMedium.copy(fontFamily = GoogleSansFlex),-        titleSmall = titleSmall.copy(fontFamily = GoogleSansFlex),-        bodyLarge = bodyLarge.copy(fontFamily = GoogleSansFlex),-        bodyMedium = bodyMedium.copy(fontFamily = GoogleSansFlex),-        bodySmall = bodySmall.copy(fontFamily = GoogleSansFlex),-        labelLarge = labelLarge.copy(fontFamily = GoogleSansFlex),-        labelMedium = labelMedium.copy(fontFamily = GoogleSansFlex),-        labelSmall = labelSmall.copy(fontFamily = GoogleSansFlex),-    )-}
library/ui/src/main/res/font/google_sans_flex.ttf
diff --git a/library/ui/src/main/res/font/google_sans_flex.ttf b/library/ui/src/main/res/font/google_sans_flex.ttfdeleted file mode 100644index 0ca1de3530..0000000000Binary files a/library/ui/src/main/res/font/google_sans_flex.ttf and /dev/null differ