This commit is contained in:
@@ -394,15 +394,9 @@ public class CustomScreenManager implements Listener {
|
||||
// 封页只填 20 字孤稀。改贪心 fill 直接取前 85 字(残句续下一页),封页满屏。
|
||||
// 正文页仍用 findSemanticCut 语义切(不劈词)。
|
||||
if (!body.isEmpty()) {
|
||||
// 15m4 封页往前扫: 从0往85找最后一个语义边界(句末/逗号/换行), 取最靠后, 避免劈词
|
||||
// 15m4 封页贪心 fill 85: 残句续第2页, 封页满屏不稀疏
|
||||
// (往前扫遇长段早停23字孤稀, 改贪心满屏; 末字劈词可接受, 残句续下页玩家能读懂)
|
||||
int cut = Math.min(body.length(), 85);
|
||||
for (int ci = cut; ci >= 0; ci--) {
|
||||
char cc = body.charAt(ci);
|
||||
if (cc == '。' || cc == '!' || cc == '?' || cc == ';' || cc == ',' || cc == ',' || cc == '\n') {
|
||||
cut = ci + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pages.add(body.substring(0, cut));
|
||||
body = body.substring(cut);
|
||||
@@ -495,7 +489,7 @@ public class CustomScreenManager implements Listener {
|
||||
for (int pi = 1; pi + 1 < pages.size(); pi++) {
|
||||
String cur = pages.get(pi);
|
||||
String nxt = pages.get(pi + 1);
|
||||
if (cur.length() < 40 && (cur.length() + nxt.length() + 1) <= 105) {
|
||||
if (cur.length() < 50 && (cur.length() + nxt.length() + 1) <= 130) {
|
||||
pages.set(pi + 1, cur + "\n" + nxt);
|
||||
pages.remove(pi);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user