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