mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
7ecff06671
commit
abdc23967c
@ -782,8 +782,11 @@ object ChapterProvider {
|
||||
paragraphSpacing = ReadBookConfig.paragraphSpacing
|
||||
titleTopSpacing = ReadBookConfig.titleTopSpacing.dpToPx()
|
||||
titleBottomSpacing = ReadBookConfig.titleBottomSpacing.dpToPx()
|
||||
val bodyIndent = ReadBookConfig.paragraphIndent
|
||||
indentCharWidth = StaticLayout.getDesiredWidth(bodyIndent, contentPaint) / bodyIndent.length
|
||||
var bodyIndent = ReadBookConfig.paragraphIndent
|
||||
val indentLength = bodyIndent.length
|
||||
// 有些字体的中文空格宽度不对
|
||||
bodyIndent = "一".repeat(indentLength)
|
||||
indentCharWidth = StaticLayout.getDesiredWidth(bodyIndent, contentPaint) / indentLength
|
||||
titlePaintTextHeight = titlePaint.textHeight
|
||||
contentPaintTextHeight = contentPaint.textHeight
|
||||
titlePaintFontMetrics = titlePaint.fontMetrics
|
||||
|
Loading…
Reference in New Issue
Block a user