Skip to content

Commit

Permalink
Set default text direction to content or LTR
Browse files Browse the repository at this point in the history
fixes: #396
  • Loading branch information
msasikanth committed Aug 7, 2024
1 parent e67d449 commit 11a3c83
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.LineHeightStyle
import androidx.compose.ui.text.style.TextDirection
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import dev.sasikanth.rss.reader.utils.toSp
Expand All @@ -32,7 +33,12 @@ expect fun createDefaultTextStyle(): TextStyle
private val figmaLineHeightStyle =
LineHeightStyle(alignment = LineHeightStyle.Alignment.Center, trim = LineHeightStyle.Trim.None)

@Stable private val defaultTextStyle = createDefaultTextStyle()
@Stable
private val defaultTextStyle =
createDefaultTextStyle()
.copy(
textDirection = TextDirection.ContentOrLtr,
)

internal fun typography(fontFamily: FontFamily) =
Typography(
Expand All @@ -42,7 +48,7 @@ internal fun typography(fontFamily: FontFamily) =
fontWeight = FontWeight.Normal,
fontSize = 57.sp,
lineHeight = 64.sp,
lineHeightStyle = figmaLineHeightStyle
lineHeightStyle = figmaLineHeightStyle,
),
displayMedium =
defaultTextStyle.copy(
Expand Down

0 comments on commit 11a3c83

Please sign in to comment.