app: switch M3 to Manrope typeface
This commit is contained in:
parent
0834c979a5
commit
2ee48cdab6
11 changed files with 57 additions and 16 deletions
|
@ -2,18 +2,29 @@ package dev.msfjarvis.aps.ui.theme
|
||||||
|
|
||||||
import androidx.compose.material3.Typography
|
import androidx.compose.material3.Typography
|
||||||
import androidx.compose.ui.text.TextStyle
|
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.FontFamily
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import dev.msfjarvis.aps.R
|
||||||
|
|
||||||
// Replace with your font locations
|
// 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 =
|
val AppTypography =
|
||||||
Typography(
|
Typography(
|
||||||
displayLarge =
|
displayLarge =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 57.sp,
|
fontSize = 57.sp,
|
||||||
lineHeight = 64.sp,
|
lineHeight = 64.sp,
|
||||||
|
@ -21,7 +32,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
displayMedium =
|
displayMedium =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 45.sp,
|
fontSize = 45.sp,
|
||||||
lineHeight = 52.sp,
|
lineHeight = 52.sp,
|
||||||
|
@ -29,7 +40,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
displaySmall =
|
displaySmall =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 36.sp,
|
fontSize = 36.sp,
|
||||||
lineHeight = 44.sp,
|
lineHeight = 44.sp,
|
||||||
|
@ -37,7 +48,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
headlineLarge =
|
headlineLarge =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 32.sp,
|
fontSize = 32.sp,
|
||||||
lineHeight = 40.sp,
|
lineHeight = 40.sp,
|
||||||
|
@ -45,7 +56,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
headlineMedium =
|
headlineMedium =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 28.sp,
|
fontSize = 28.sp,
|
||||||
lineHeight = 36.sp,
|
lineHeight = 36.sp,
|
||||||
|
@ -53,7 +64,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
headlineSmall =
|
headlineSmall =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 24.sp,
|
fontSize = 24.sp,
|
||||||
lineHeight = 32.sp,
|
lineHeight = 32.sp,
|
||||||
|
@ -61,7 +72,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
titleLarge =
|
titleLarge =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 22.sp,
|
fontSize = 22.sp,
|
||||||
lineHeight = 28.sp,
|
lineHeight = 28.sp,
|
||||||
|
@ -69,7 +80,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
titleMedium =
|
titleMedium =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
lineHeight = 24.sp,
|
lineHeight = 24.sp,
|
||||||
|
@ -77,7 +88,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
titleSmall =
|
titleSmall =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
lineHeight = 20.sp,
|
lineHeight = 20.sp,
|
||||||
|
@ -85,7 +96,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
labelLarge =
|
labelLarge =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
lineHeight = 20.sp,
|
lineHeight = 20.sp,
|
||||||
|
@ -93,7 +104,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
bodyLarge =
|
bodyLarge =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
lineHeight = 24.sp,
|
lineHeight = 24.sp,
|
||||||
|
@ -101,7 +112,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
bodyMedium =
|
bodyMedium =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
lineHeight = 20.sp,
|
lineHeight = 20.sp,
|
||||||
|
@ -109,7 +120,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
bodySmall =
|
bodySmall =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 16.sp,
|
lineHeight = 16.sp,
|
||||||
|
@ -117,7 +128,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
labelMedium =
|
labelMedium =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 16.sp,
|
lineHeight = 16.sp,
|
||||||
|
@ -125,7 +136,7 @@ val AppTypography =
|
||||||
),
|
),
|
||||||
labelSmall =
|
labelSmall =
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily = Roboto,
|
fontFamily = Manrope,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 11.sp,
|
fontSize = 11.sp,
|
||||||
lineHeight = 16.sp,
|
lineHeight = 16.sp,
|
||||||
|
|
28
app/src/main/res/font/manrope.xml
Normal file
28
app/src/main/res/font/manrope.xml
Normal file
|
@ -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>
|
BIN
app/src/main/res/font/manrope_bold.ttf
Normal file
BIN
app/src/main/res/font/manrope_bold.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_extrabold.ttf
Normal file
BIN
app/src/main/res/font/manrope_extrabold.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_extralight.ttf
Normal file
BIN
app/src/main/res/font/manrope_extralight.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_light.ttf
Normal file
BIN
app/src/main/res/font/manrope_light.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_medium.ttf
Normal file
BIN
app/src/main/res/font/manrope_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_regular.ttf
Normal file
BIN
app/src/main/res/font/manrope_regular.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/manrope_semibold.ttf
Normal file
BIN
app/src/main/res/font/manrope_semibold.ttf
Normal file
Binary file not shown.
|
@ -32,5 +32,6 @@
|
||||||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
||||||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_dark_primaryInverse</item>
|
<item name="colorPrimaryInverse">@color/md_theme_dark_primaryInverse</item>
|
||||||
|
<item name="fontFamily">@font/manrope</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -32,5 +32,6 @@
|
||||||
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
|
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
|
||||||
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_light_primaryInverse</item>
|
<item name="colorPrimaryInverse">@color/md_theme_light_primaryInverse</item>
|
||||||
|
<item name="fontFamily">@font/manrope</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue