This commit is contained in:
@@ -394,10 +394,19 @@ public class CustomScreenManager implements Listener {
|
|||||||
// 封页只填 20 字孤稀。改贪心 fill 直接取前 85 字(残句续下一页),封页满屏。
|
// 封页只填 20 字孤稀。改贪心 fill 直接取前 85 字(残句续下一页),封页满屏。
|
||||||
// 正文页仍用 findSemanticCut 语义切(不劈词)。
|
// 正文页仍用 findSemanticCut 语义切(不劈词)。
|
||||||
if (!body.isEmpty()) {
|
if (!body.isEmpty()) {
|
||||||
// 15m7 封页贪心 fill 100: 95→100 一次加5(用户节奏: 一点点加, 慢慢找合适大小)
|
// 15m8 封页根治"劈在句末/标题": 满屏贪心但避开孤短句末切点。
|
||||||
// 封页切点固定=此字数, 调大=封页往正文后面多写一点
|
// 从100往回扫句末标点(。!?;\n), 若切点<55字(孤短, 如"所有玩家一律平等;")
|
||||||
int cut = Math.min(body.length(), 100);
|
// 则退化硬切100(残句续下页, 玩家能读懂), 封页不孤稀也不劈标题。
|
||||||
|
int coverLimit = 100;
|
||||||
|
int best = -1;
|
||||||
|
for (int i = Math.min(body.length() - 1, coverLimit); i >= 0; i--) {
|
||||||
|
char c = body.charAt(i);
|
||||||
|
if (c == '。' || c == '!' || c == '?' || c == ';' || c == '\n') {
|
||||||
|
best = i + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int cut = (best < 55) ? Math.min(body.length(), coverLimit) : Math.min(body.length(), best);
|
||||||
pages.add(body.substring(0, cut));
|
pages.add(body.substring(0, cut));
|
||||||
body = body.substring(cut);
|
body = body.substring(cut);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user