aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-11-01 02:09:36 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-11-03 15:07:00 +0530
commit2ee48cdab665c45659cd9f4dcc32b1042a0b7f6c (patch)
treedf6e092a97a81fa40b2b2676728c80478b3b9b75
parent0834c979a5c6a41106282ffc8a8be72255f780fa (diff)
app: switch M3 to Manrope typeface
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/theme/Type.kt43
-rw-r--r--app/src/main/res/font/manrope.xml28
-rw-r--r--app/src/main/res/font/manrope_bold.ttfbin0 -> 92228 bytes
-rw-r--r--app/src/main/res/font/manrope_extrabold.ttfbin0 -> 93144 bytes
-rw-r--r--app/src/main/res/font/manrope_extralight.ttfbin0 -> 92272 bytes
-rw-r--r--app/src/main/res/font/manrope_light.ttfbin0 -> 92400 bytes
-rw-r--r--app/src/main/res/font/manrope_medium.ttfbin0 -> 92464 bytes
-rw-r--r--app/src/main/res/font/manrope_regular.ttfbin0 -> 92376 bytes
-rw-r--r--app/src/main/res/font/manrope_semibold.ttfbin0 -> 92380 bytes
-rw-r--r--app/src/main/res/values-night/themes_material3.xml1
-rw-r--r--app/src/main/res/values/themes_material3.xml1
11 files changed, 57 insertions, 16 deletions
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 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ ~ SPDX-License-Identifier: GPL-3.0-only
+ -->
+
+<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
+ <font
+ app:font="@font/manrope_extralight"
+ app:fontWeight="200" />
+ <font
+ app:font="@font/manrope_light"
+ app:fontWeight="300" />
+ <font
+ app:font="@font/manrope_regular"
+ app:fontWeight="400" />
+ <font
+ app:font="@font/manrope_medium"
+ app:fontWeight="500" />
+ <font
+ app:font="@font/manrope_semibold"
+ app:fontWeight="600" />
+ <font
+ app:font="@font/manrope_bold"
+ app:fontWeight="700" />
+ <font
+ app:font="@font/manrope_extrabold"
+ app:fontWeight="800" />
+</font-family>
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
--- /dev/null
+++ b/app/src/main/res/font/manrope_bold.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_extrabold.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_extralight.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_light.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_medium.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_regular.ttf
Binary files 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
--- /dev/null
+++ b/app/src/main/res/font/manrope_semibold.ttf
Binary files 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 @@
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_primaryInverse</item>
+ <item name="fontFamily">@font/manrope</item>
</style>
</resources>
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 @@
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_primaryInverse</item>
+ <item name="fontFamily">@font/manrope</item>
</style>
</resources>