From 2ee48cdab665c45659cd9f4dcc32b1042a0b7f6c Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 1 Nov 2021 02:09:36 +0530 Subject: app: switch M3 to Manrope typeface --- .../main/java/dev/msfjarvis/aps/ui/theme/Type.kt | 43 +++++++++++++-------- app/src/main/res/font/manrope.xml | 28 ++++++++++++++ app/src/main/res/font/manrope_bold.ttf | Bin 0 -> 92228 bytes app/src/main/res/font/manrope_extrabold.ttf | Bin 0 -> 93144 bytes app/src/main/res/font/manrope_extralight.ttf | Bin 0 -> 92272 bytes app/src/main/res/font/manrope_light.ttf | Bin 0 -> 92400 bytes app/src/main/res/font/manrope_medium.ttf | Bin 0 -> 92464 bytes app/src/main/res/font/manrope_regular.ttf | Bin 0 -> 92376 bytes app/src/main/res/font/manrope_semibold.ttf | Bin 0 -> 92380 bytes app/src/main/res/values-night/themes_material3.xml | 1 + app/src/main/res/values/themes_material3.xml | 1 + 11 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 app/src/main/res/font/manrope.xml create mode 100644 app/src/main/res/font/manrope_bold.ttf create mode 100644 app/src/main/res/font/manrope_extrabold.ttf create mode 100644 app/src/main/res/font/manrope_extralight.ttf create mode 100644 app/src/main/res/font/manrope_light.ttf create mode 100644 app/src/main/res/font/manrope_medium.ttf create mode 100644 app/src/main/res/font/manrope_regular.ttf create mode 100644 app/src/main/res/font/manrope_semibold.ttf (limited to 'app') diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Type.kt b/app/src/main/java/dev/msfjarvis/aps/ui/theme/Type.kt index a8472f00..55ee448c 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Type.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/theme/Type.kt @@ -2,18 +2,29 @@ package dev.msfjarvis.aps.ui.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp +import dev.msfjarvis.aps.R // Replace with your font locations -val Roboto = FontFamily.Default +val Manrope = + 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), + ) val AppTypography = Typography( displayLarge = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 57.sp, lineHeight = 64.sp, @@ -21,7 +32,7 @@ val AppTypography = ), displayMedium = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 45.sp, lineHeight = 52.sp, @@ -29,7 +40,7 @@ val AppTypography = ), displaySmall = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 36.sp, lineHeight = 44.sp, @@ -37,7 +48,7 @@ val AppTypography = ), headlineLarge = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 32.sp, lineHeight = 40.sp, @@ -45,7 +56,7 @@ val AppTypography = ), headlineMedium = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 28.sp, lineHeight = 36.sp, @@ -53,7 +64,7 @@ val AppTypography = ), headlineSmall = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 24.sp, lineHeight = 32.sp, @@ -61,7 +72,7 @@ val AppTypography = ), titleLarge = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 22.sp, lineHeight = 28.sp, @@ -69,7 +80,7 @@ val AppTypography = ), titleMedium = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.Medium, fontSize = 16.sp, lineHeight = 24.sp, @@ -77,7 +88,7 @@ val AppTypography = ), titleSmall = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.Medium, fontSize = 14.sp, lineHeight = 20.sp, @@ -85,7 +96,7 @@ val AppTypography = ), labelLarge = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.Medium, fontSize = 14.sp, lineHeight = 20.sp, @@ -93,7 +104,7 @@ val AppTypography = ), bodyLarge = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 16.sp, lineHeight = 24.sp, @@ -101,7 +112,7 @@ val AppTypography = ), bodyMedium = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 14.sp, lineHeight = 20.sp, @@ -109,7 +120,7 @@ val AppTypography = ), bodySmall = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.W400, fontSize = 12.sp, lineHeight = 16.sp, @@ -117,7 +128,7 @@ val AppTypography = ), labelMedium = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.Medium, fontSize = 12.sp, lineHeight = 16.sp, @@ -125,7 +136,7 @@ val AppTypography = ), labelSmall = TextStyle( - fontFamily = Roboto, + fontFamily = Manrope, fontWeight = FontWeight.Medium, fontSize = 11.sp, lineHeight = 16.sp, diff --git a/app/src/main/res/font/manrope.xml b/app/src/main/res/font/manrope.xml new file mode 100644 index 00000000..c1ecac5c --- /dev/null +++ b/app/src/main/res/font/manrope.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/app/src/main/res/font/manrope_bold.ttf b/app/src/main/res/font/manrope_bold.ttf new file mode 100644 index 00000000..8bbf0bd1 Binary files /dev/null and b/app/src/main/res/font/manrope_bold.ttf differ diff --git a/app/src/main/res/font/manrope_extrabold.ttf b/app/src/main/res/font/manrope_extrabold.ttf new file mode 100644 index 00000000..3f68dffc Binary files /dev/null and b/app/src/main/res/font/manrope_extrabold.ttf differ diff --git a/app/src/main/res/font/manrope_extralight.ttf b/app/src/main/res/font/manrope_extralight.ttf new file mode 100644 index 00000000..9d21d775 Binary files /dev/null and b/app/src/main/res/font/manrope_extralight.ttf differ diff --git a/app/src/main/res/font/manrope_light.ttf b/app/src/main/res/font/manrope_light.ttf new file mode 100644 index 00000000..f255257a Binary files /dev/null and b/app/src/main/res/font/manrope_light.ttf differ diff --git a/app/src/main/res/font/manrope_medium.ttf b/app/src/main/res/font/manrope_medium.ttf new file mode 100644 index 00000000..c73d7741 Binary files /dev/null and b/app/src/main/res/font/manrope_medium.ttf differ diff --git a/app/src/main/res/font/manrope_regular.ttf b/app/src/main/res/font/manrope_regular.ttf new file mode 100644 index 00000000..c02b01be Binary files /dev/null and b/app/src/main/res/font/manrope_regular.ttf differ diff --git a/app/src/main/res/font/manrope_semibold.ttf b/app/src/main/res/font/manrope_semibold.ttf new file mode 100644 index 00000000..30ee0310 Binary files /dev/null and b/app/src/main/res/font/manrope_semibold.ttf differ diff --git a/app/src/main/res/values-night/themes_material3.xml b/app/src/main/res/values-night/themes_material3.xml index a06aefe8..33533e44 100644 --- a/app/src/main/res/values-night/themes_material3.xml +++ b/app/src/main/res/values-night/themes_material3.xml @@ -32,5 +32,6 @@ @color/md_theme_dark_inverseOnSurface @color/md_theme_dark_inverseSurface @color/md_theme_dark_primaryInverse + @font/manrope diff --git a/app/src/main/res/values/themes_material3.xml b/app/src/main/res/values/themes_material3.xml index 047fce33..2d692627 100644 --- a/app/src/main/res/values/themes_material3.xml +++ b/app/src/main/res/values/themes_material3.xml @@ -32,5 +32,6 @@ @color/md_theme_light_inverseOnSurface @color/md_theme_light_inverseSurface @color/md_theme_light_primaryInverse + @font/manrope -- cgit v1.2.3