From dabb66018fe339a0a1a50057d10a813605fb4222 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 8 Mar 2021 09:09:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/page/entities/TextPage.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt index 0c90a541e..6108710f7 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt @@ -72,7 +72,11 @@ data class TextPage( val char = textLine.text[i].toString() val cw = StaticLayout.getDesiredWidth(char, ChapterProvider.contentPaint) val x1 = x + cw - textLine.addTextChar(charData = char, start = x, end = x1) + textLine.textChars.add( + TextChar( + char, start = x, end = x1 + ) + ) x = x1 } textLines.add(textLine)