Merge "Enable Hyphens.Auto for SPA" into udc-dev am: 97d648ce18

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23381749

Change-Id: Ic4a23ddcbec56bf73eca47a93aefe92898497c05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-05-29 06:46:16 +00:00
committed by Automerger Merge Worker

View File

@@ -21,6 +21,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.Hyphens
import androidx.compose.ui.unit.em import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
@@ -34,42 +35,48 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 57.sp, fontSize = 57.sp,
lineHeight = 64.sp, lineHeight = 64.sp,
letterSpacing = (-0.2).sp letterSpacing = (-0.2).sp,
hyphens = Hyphens.Auto,
), ),
displayMedium = TextStyle( displayMedium = TextStyle(
fontFamily = brand, fontFamily = brand,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 45.sp, fontSize = 45.sp,
lineHeight = 52.sp, lineHeight = 52.sp,
letterSpacing = 0.0.sp letterSpacing = 0.0.sp,
hyphens = Hyphens.Auto,
), ),
displaySmall = TextStyle( displaySmall = TextStyle(
fontFamily = brand, fontFamily = brand,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 36.sp, fontSize = 36.sp,
lineHeight = 44.sp, lineHeight = 44.sp,
letterSpacing = 0.0.sp letterSpacing = 0.0.sp,
hyphens = Hyphens.Auto,
), ),
headlineLarge = TextStyle( headlineLarge = TextStyle(
fontFamily = brand, fontFamily = brand,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 32.sp, fontSize = 32.sp,
lineHeight = 40.sp, lineHeight = 40.sp,
letterSpacing = 0.0.sp letterSpacing = 0.0.sp,
hyphens = Hyphens.Auto,
), ),
headlineMedium = TextStyle( headlineMedium = TextStyle(
fontFamily = brand, fontFamily = brand,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 28.sp, fontSize = 28.sp,
lineHeight = 36.sp, lineHeight = 36.sp,
letterSpacing = 0.0.sp letterSpacing = 0.0.sp,
hyphens = Hyphens.Auto,
), ),
headlineSmall = TextStyle( headlineSmall = TextStyle(
fontFamily = brand, fontFamily = brand,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 24.sp, fontSize = 24.sp,
lineHeight = 32.sp, lineHeight = 32.sp,
letterSpacing = 0.0.sp letterSpacing = 0.0.sp,
hyphens = Hyphens.Auto,
), ),
titleLarge = TextStyle( titleLarge = TextStyle(
fontFamily = brand, fontFamily = brand,
@@ -77,6 +84,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 22.sp, fontSize = 22.sp,
lineHeight = 28.sp, lineHeight = 28.sp,
letterSpacing = 0.02.em, letterSpacing = 0.02.em,
hyphens = Hyphens.Auto,
), ),
titleMedium = TextStyle( titleMedium = TextStyle(
fontFamily = brand, fontFamily = brand,
@@ -84,6 +92,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 20.sp, fontSize = 20.sp,
lineHeight = 24.sp, lineHeight = 24.sp,
letterSpacing = 0.02.em, letterSpacing = 0.02.em,
hyphens = Hyphens.Auto,
), ),
titleSmall = TextStyle( titleSmall = TextStyle(
fontFamily = brand, fontFamily = brand,
@@ -91,6 +100,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 18.sp, fontSize = 18.sp,
lineHeight = 20.sp, lineHeight = 20.sp,
letterSpacing = 0.02.em, letterSpacing = 0.02.em,
hyphens = Hyphens.Auto,
), ),
bodyLarge = TextStyle( bodyLarge = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -98,6 +108,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 16.sp, fontSize = 16.sp,
lineHeight = 24.sp, lineHeight = 24.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
bodyMedium = TextStyle( bodyMedium = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -105,6 +116,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 14.sp, fontSize = 14.sp,
lineHeight = 20.sp, lineHeight = 20.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
bodySmall = TextStyle( bodySmall = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -112,6 +124,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 12.sp, fontSize = 12.sp,
lineHeight = 16.sp, lineHeight = 16.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
labelLarge = TextStyle( labelLarge = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -119,6 +132,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 16.sp, fontSize = 16.sp,
lineHeight = 24.sp, lineHeight = 24.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
labelMedium = TextStyle( labelMedium = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -126,6 +140,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 14.sp, fontSize = 14.sp,
lineHeight = 20.sp, lineHeight = 20.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
labelSmall = TextStyle( labelSmall = TextStyle(
fontFamily = plain, fontFamily = plain,
@@ -133,6 +148,7 @@ private class SettingsTypography(settingsFontFamily: SettingsFontFamily) {
fontSize = 12.sp, fontSize = 12.sp,
lineHeight = 16.sp, lineHeight = 16.sp,
letterSpacing = 0.01.em, letterSpacing = 0.01.em,
hyphens = Hyphens.Auto,
), ),
) )
} }