diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index e5dd147e7..6a7b2685b 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -453,8 +453,11 @@ interface JsExtensions { contentArray.forEachIndexed { index, s -> val oldCode = s.code if (font1.inLimit(s)) { - val code = font2.getCodeByGlyf(font1.getGlyfByCode(oldCode)) - if (code != 0) contentArray[index] = code.toChar() + val glyf = font1.getGlyfByCode(oldCode) + val code = font2.getCodeByGlyf(glyf) + if (code != 0) { + contentArray[index] = code.toChar() + } } } return contentArray.joinToString("")