From d9035a6abc3c92fc7caa0b3b683575a7b2917a5c Mon Sep 17 00:00:00 2001
From: youpaishidifu <1@ypshidifu.cn>
Date: Sun, 22 Nov 2026 21:20:00 +0800
Subject: [PATCH] =?UTF-8?q?125=E7=BB=AD15m4:=20=E6=88=90=E4=B9=A6=E5=B0=81?=
=?UTF-8?q?=E9=A1=B5=E5=BE=80=E5=89=8D=E6=89=AB=E8=AF=AD=E4=B9=89=E8=BE=B9?=
=?UTF-8?q?=E7=95=8C(=E9=81=BF=E5=85=8D=E8=B4=AA=E5=BF=83=E7=A1=AC?=
=?UTF-8?q?=E5=88=87=E5=8A=88=E8=AF=8D=E8=87=B4=E4=B8=AD=E9=97=B4=E5=AD=A4?=
=?UTF-8?q?=E7=9F=AD=E9=A1=B5)+=E4=B8=AD=E9=97=B4=E5=AD=A4=E7=9F=AD?=
=?UTF-8?q?=E9=A1=B5<40=E5=B9=B6=E5=85=A5=E4=B8=8B=E9=A1=B5(<=3D105)+findS?=
=?UTF-8?q?emanticCut=E5=AE=B9=E5=B7=AE=E5=8F=82=E6=95=B0=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
210952.html | 299 ++++++++++++++++++
curl.htm | 299 ++++++++++++++++++
.../java/Sdf1_login/CustomScreenManager.java | 35 +-
3 files changed, 626 insertions(+), 7 deletions(-)
create mode 100644 210952.html
create mode 100644 curl.htm
diff --git a/210952.html b/210952.html
new file mode 100644
index 0000000..aed3eb9
--- /dev/null
+++ b/210952.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+登录会话过期,请重新登录..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录会话过期,请重新登录..
+
+
+ 登录状态已失效,正在前往登录页。
+
+
+
+
+
+
+
+
+
+
diff --git a/curl.htm b/curl.htm
new file mode 100644
index 0000000..7feef59
--- /dev/null
+++ b/curl.htm
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+登录会话过期,请重新登录..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录会话过期,请重新登录..
+
+
+ 登录状态已失效,正在前往登录页。
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/Sdf1_login/CustomScreenManager.java b/src/main/java/Sdf1_login/CustomScreenManager.java
index 15ed7eb..b072e8a 100644
--- a/src/main/java/Sdf1_login/CustomScreenManager.java
+++ b/src/main/java/Sdf1_login/CustomScreenManager.java
@@ -390,10 +390,20 @@ public class CustomScreenManager implements Listener {
// ★ 15l-7k 的「投票规则详见第六章第3节;」分号容差需求,靠 findSemanticCut 的
// 容差 limit+10=110 仍能满足(分号若落在 100~110 之间仍纳入切点)。
// ★ 15m3 回退 15m2 的 cut<60 并入逻辑:封页正常 fill 85(标题+协议目的+长段开头)。
- // 15m2 把封页太稀并入正文反而让页1 更短(20字),CR 修复后封页 85 字正常不孤稀。
- // findSemanticCut 容差+10 让切点尽量到 85~95,标题页填满。
+ // ★ 15m4 封页根治稀疏:旧 findSemanticCut(body,85) 在标题行后 早停到 20 字,
+ // 封页只填 20 字孤稀。改贪心 fill 直接取前 85 字(残句续下一页),封页满屏。
+ // 正文页仍用 findSemanticCut 语义切(不劈词)。
if (!body.isEmpty()) {
- int cut = findSemanticCut(body, 85);
+ // 15m4 封页往前扫: 从0往85找最后一个语义边界(句末/逗号/换行), 取最靠后, 避免劈词
+ 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);
}
@@ -481,6 +491,16 @@ public class CustomScreenManager implements Listener {
}
}
+ // 15m4 中间孤短页合并: 封页贪心fill切出的残句页(<40字)并入下页, 避免孤稀
+ 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) {
+ pages.set(pi + 1, cur + "\n" + nxt);
+ pages.remove(pi);
+ }
+ }
+
bookMeta.setPages(pages);
book.setItemMeta(meta);
return book;
@@ -557,10 +577,11 @@ public class CustomScreenManager implements Listener {
* 超 MC 成书 UI 一屏竖排实际视口 ~130 字,仍劈「使用/法」。+10 时 100+10=110,
* 安全落视口内。超 limit+10 仍硬切 limit。
*/
- private int findSemanticCut(String s, int limit) {
+ private int findSemanticCut(String s, int limit) { return findSemanticCut(s, limit, 10); }
+ private int findSemanticCut(String s, int limit, int tol) {
if (s.length() <= limit) return s.length();
int best = -1;
- int searchEnd = Math.min(s.length() - 1, limit + 10); // ★ 15l-7m 容差收紧 +20→+10
+ int searchEnd = Math.min(s.length() - 1, limit + tol); // ★ 15m4 容差参数化(默认10,封页20)
for (int i = searchEnd; i >= 0; i--) {
char c = s.charAt(i);
if (c == '。' || c == '!' || c == '?' || c == ';' || c == '\n') {
@@ -568,7 +589,7 @@ public class CustomScreenManager implements Listener {
break;
}
}
- if (best <= 0 || best > limit + 10) {
+ if (best <= 0 || best > limit + tol) {
// 退化:limit 以内找逗号/空格
for (int i = Math.min(s.length() - 1, limit - 1); i >= 0; i--) {
char c = s.charAt(i);
@@ -578,7 +599,7 @@ public class CustomScreenManager implements Listener {
}
}
}
- if (best <= 0 || best > limit + 10) best = limit;
+ if (best <= 0 || best > limit + tol) best = limit;
return best;
}