@@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
8
8
import androidx.compose.foundation.text.InlineTextContent
9
9
import androidx.compose.foundation.text.appendInlineContent
10
10
import androidx.compose.material3.HorizontalDivider
11
+ import androidx.compose.material3.LocalTextStyle
11
12
import androidx.compose.material3.MaterialTheme
12
13
import androidx.compose.material3.Text
13
14
import androidx.compose.runtime.*
@@ -20,10 +21,12 @@ import androidx.compose.ui.platform.LocalDensity
20
21
import androidx.compose.ui.text.*
21
22
import androidx.compose.ui.text.font.FontWeight
22
23
import androidx.compose.ui.text.style.TextDecoration
24
+ import androidx.compose.ui.text.style.TextIndent
23
25
import androidx.compose.ui.unit.sp
24
26
import cafe.adriel.voyager.navigator.LocalNavigator
25
27
import cafe.adriel.voyager.navigator.currentOrThrow
26
28
import top.kagg886.pixko.module.illust.Illust
29
+ import top.kagg886.pmf.backend.AppConfig
27
30
import top.kagg886.pmf.ui.component.ImagePreviewer
28
31
import top.kagg886.pmf.ui.component.ProgressedAsyncImage
29
32
import top.kagg886.pmf.ui.route.main.detail.illust.IllustDetailScreen
@@ -177,6 +180,10 @@ fun RichText(
177
180
Text (
178
181
text = annotateString,
179
182
inlineContent = inlineNode,
183
+ style = if (AppConfig .autoTypo) TextStyle (
184
+ textIndent = TextIndent (firstLine = 24 .sp),
185
+ lineHeight = 24 .sp
186
+ ) else LocalTextStyle .current,
180
187
modifier = modifier.onGloballyPositioned {
181
188
screenWidth = with (density) {
182
189
it.boundsInParent().width.toSp()
0 commit comments