Add TextStyle for getting rid of font padding
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package io.element.android.libraries.designsystem.theme
|
||||
|
||||
import androidx.compose.ui.text.PlatformTextStyle
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
@@ -107,3 +108,13 @@ val titleMediumDefault: TextStyle = TextStyle(
|
||||
letterSpacing = 0.5.sp
|
||||
)
|
||||
|
||||
// Temporary style for text that needs to be aligned without weird font padding issues. `includeFontPadding` will default to false in a future version of
|
||||
// compose, at which point this can be removed.
|
||||
//
|
||||
// Ref: https://medium.com/androiddevelopers/fixing-font-padding-in-compose-text-768cd232425b
|
||||
@Suppress("DEPRECATION")
|
||||
val noFontPadding: TextStyle = TextStyle(
|
||||
platformStyle = PlatformTextStyle(
|
||||
includeFontPadding = false
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user