mirror of
https://github.com/bitwarden/android.git
synced 2025-02-17 20:40:00 +03:00
BIT-691: Adding typography values from design, adding Roboto fonts to res (#78)
This commit is contained in:
parent
1f1985c0dc
commit
ea8806d20d
3 changed files with 103 additions and 3 deletions
|
@ -2,16 +2,116 @@ package com.x8bit.bitwarden.ui.platform.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 com.x8bit.bitwarden.R
|
||||||
|
|
||||||
val Typography: Typography = Typography(
|
val Typography: Typography = Typography(
|
||||||
bodyLarge = TextStyle(
|
displayLarge = TextStyle(
|
||||||
fontFamily = FontFamily.Default,
|
fontSize = 57.sp,
|
||||||
fontWeight = FontWeight.Normal,
|
lineHeight = 64.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = (-0.25).sp,
|
||||||
|
),
|
||||||
|
displayMedium = TextStyle(
|
||||||
|
fontSize = 45.sp,
|
||||||
|
lineHeight = 52.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = (0).sp,
|
||||||
|
),
|
||||||
|
displaySmall = TextStyle(
|
||||||
|
fontSize = 36.sp,
|
||||||
|
lineHeight = 44.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.sp,
|
||||||
|
),
|
||||||
|
headlineLarge = TextStyle(
|
||||||
|
fontSize = 32.sp,
|
||||||
|
lineHeight = 40.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.sp,
|
||||||
|
),
|
||||||
|
headlineMedium = TextStyle(
|
||||||
|
fontSize = 28.sp,
|
||||||
|
lineHeight = 36.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.sp,
|
||||||
|
),
|
||||||
|
headlineSmall = TextStyle(
|
||||||
|
fontSize = 24.sp,
|
||||||
|
lineHeight = 32.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.sp,
|
||||||
|
),
|
||||||
|
titleLarge = TextStyle(
|
||||||
|
fontSize = 22.sp,
|
||||||
|
lineHeight = 28.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.sp,
|
||||||
|
),
|
||||||
|
titleMedium = TextStyle(
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
lineHeight = 24.sp,
|
lineHeight = 24.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_medium)),
|
||||||
|
fontWeight = FontWeight.W500,
|
||||||
|
letterSpacing = 0.15.sp,
|
||||||
|
),
|
||||||
|
titleSmall = TextStyle(
|
||||||
|
fontSize = 14.sp,
|
||||||
|
lineHeight = 20.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_medium)),
|
||||||
|
fontWeight = FontWeight.W500,
|
||||||
|
letterSpacing = 0.1.sp,
|
||||||
|
),
|
||||||
|
bodyLarge = TextStyle(
|
||||||
|
fontSize = 16.sp,
|
||||||
|
lineHeight = 24.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.5.sp,
|
||||||
|
),
|
||||||
|
bodyMedium = TextStyle(
|
||||||
|
fontSize = 14.sp,
|
||||||
|
lineHeight = 20.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.25.sp,
|
||||||
|
),
|
||||||
|
bodySmall = TextStyle(
|
||||||
|
fontSize = 12.sp,
|
||||||
|
lineHeight = 16.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_regular)),
|
||||||
|
fontWeight = FontWeight.W400,
|
||||||
|
letterSpacing = 0.4.sp,
|
||||||
|
),
|
||||||
|
labelLarge = TextStyle(
|
||||||
|
fontSize = 14.sp,
|
||||||
|
lineHeight = 20.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_medium)),
|
||||||
|
fontWeight = FontWeight.W500,
|
||||||
|
letterSpacing = 0.1.sp,
|
||||||
|
),
|
||||||
|
labelMedium = TextStyle(
|
||||||
|
fontSize = 12.sp,
|
||||||
|
lineHeight = 16.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_medium)),
|
||||||
|
fontWeight = FontWeight.W500,
|
||||||
|
letterSpacing = 0.5.sp,
|
||||||
|
),
|
||||||
|
labelSmall = TextStyle(
|
||||||
|
fontSize = 11.sp,
|
||||||
|
lineHeight = 16.sp,
|
||||||
|
fontFamily = FontFamily(Font(R.font.roboto_medium)),
|
||||||
|
fontWeight = FontWeight.W500,
|
||||||
letterSpacing = 0.5.sp,
|
letterSpacing = 0.5.sp,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
BIN
app/src/main/res/font/roboto_medium.ttf
Normal file
BIN
app/src/main/res/font/roboto_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/roboto_regular.ttf
Normal file
BIN
app/src/main/res/font/roboto_regular.ttf
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue