mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
common: add Manrope as a custom font
This commit is contained in:
parent
76973ccec2
commit
7991e769cb
3 changed files with 45 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
@file:JvmName("AndroidTheme")
|
||||||
|
|
||||||
|
package dev.msfjarvis.claw.common.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.text.font.Font
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import dev.msfjarvis.claw.common.R
|
||||||
|
|
||||||
|
actual val manropeFontFamily =
|
||||||
|
FontFamily(
|
||||||
|
Font(R.font.manrope_bold, FontWeight.Bold),
|
||||||
|
Font(R.font.manrope_extrabold, FontWeight.ExtraBold),
|
||||||
|
Font(R.font.manrope_extralight, FontWeight.ExtraLight),
|
||||||
|
Font(R.font.manrope_light, FontWeight.Light),
|
||||||
|
Font(R.font.manrope_medium, FontWeight.Medium),
|
||||||
|
Font(R.font.manrope_regular, FontWeight.Normal),
|
||||||
|
Font(R.font.manrope_semibold, FontWeight.SemiBold),
|
||||||
|
)
|
|
@ -1,10 +1,14 @@
|
||||||
package dev.msfjarvis.claw.common.theme
|
package dev.msfjarvis.claw.common.theme
|
||||||
|
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material.MaterialTheme
|
||||||
|
import androidx.compose.material.Typography
|
||||||
import androidx.compose.material.darkColors
|
import androidx.compose.material.darkColors
|
||||||
import androidx.compose.material.lightColors
|
import androidx.compose.material.lightColors
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
|
||||||
|
expect val manropeFontFamily: FontFamily
|
||||||
|
|
||||||
val titleColor = Color(0xFF7395D9)
|
val titleColor = Color(0xFF7395D9)
|
||||||
|
|
||||||
|
@ -36,6 +40,10 @@ val darkColors =
|
||||||
fun LobstersTheme(darkTheme: Boolean, children: @Composable () -> Unit) {
|
fun LobstersTheme(darkTheme: Boolean, children: @Composable () -> Unit) {
|
||||||
MaterialTheme(
|
MaterialTheme(
|
||||||
colors = if (darkTheme) darkColors else lightColors,
|
colors = if (darkTheme) darkColors else lightColors,
|
||||||
|
typography =
|
||||||
|
Typography(
|
||||||
|
defaultFontFamily = manropeFontFamily,
|
||||||
|
),
|
||||||
content = children,
|
content = children,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
@file:JvmName("DesktopTheme")
|
||||||
|
|
||||||
|
package dev.msfjarvis.claw.common.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.text.platform.Font
|
||||||
|
|
||||||
|
actual val manropeFontFamily =
|
||||||
|
FontFamily(
|
||||||
|
Font("font/manrope_bold.ttf", FontWeight.Bold),
|
||||||
|
Font("font/manrope_extrabold.ttf", FontWeight.ExtraBold),
|
||||||
|
Font("font/manrope_extralight.ttf", FontWeight.ExtraLight),
|
||||||
|
Font("font/manrope_light.ttf", FontWeight.Light),
|
||||||
|
Font("font/manrope_medium.ttf", FontWeight.Medium),
|
||||||
|
Font("font/manrope_regular.ttf", FontWeight.Normal),
|
||||||
|
Font("font/manrope_semibold.ttf", FontWeight.SemiBold),
|
||||||
|
)
|
Loading…
Add table
Add a link
Reference in a new issue