fix(app-iced): 必修1 「72 字符」改成逐行口径,上限 435 → 424
代码 r2 的复核:`435 / 6.0526 = 71.9` 是**整段平均步进**换来的数,不是每行都 ≤72; 它实测交付图里就有 **73 字符**行(`guess. Nothing on this page is wired to real data yet: the layout is, the`, ink 428px)。上一轮是系数错,这一轮是**把平均当成了逐行上界**。 选 **(a)**:不变式改成逐行可验证,cap 跟着压到能满足它的地方。依据是 FreeType 量宽 + 贪心词折行的模拟表 (同一段 361 字符正文扫列宽): | 列宽 | 最长一行 | 该行 ink | 判定 | |---|---|---|---| | 435(= 平均口径上界) | 73 字符 | 428px | ✗ | | 428 | 73 字符 | 428px | ✗ | | 426 | 71 字符 | 426px | ✓ 只剩 1 字符余量 | | **424**(4px 栅格) | **67 字符** | **402px** | ✓ 取这个 | - `measure_cap_px()` = `min(逐行安全宽 424, 平均口径上界 435)` = **424**;平均口径另立 `measure_average_bound_px()`(435)并在文档里标明「只是上界,不是取值」。 - 单测 `line_length_is_capped_at_72_characters` 改成**两侧夹逼**:`402 ≤ cap < 428` —— 放大到 428 会重新出现 73 字符行(红),压到 402 以下白丢宽度(也红);另断言 `cap < measure_average_bound_px()`,防止有人把平均口径当上限。 - §3 新增「逐行口径」小节:模拟表 + **作用域**(承诺只覆盖 14px 正文;12px 辅助文案是 1~2 行短句, 不做逐行承诺;CJK 全角 1em 另行定)。 - 四页文档与 `pages/mod.rs` 的 ≤435 同步改 424。
This commit is contained in:
1 parent
a650f8184b
commit
ddf6937b2b
7 files changed
+93
-29
No files matched your search
@@ -15,7 +15,7 @@
|
||||
//!
|
||||
//! 1. **宽度档位**:官方响应式断点 **600 / 840**([`layout::WidthClass`]);
|
||||
//! 2. **版面**:单列 / supporting-pane / list-detail,各自的成立条件与退化阈值写在 [`layout`];
|
||||
//! 3. **行宽上限**:正文列硬上限 **435px = 实测 72 字符**([`layout::measure_cap_px`]),
|
||||
//! 3. **行宽上限**:正文列硬上限 **424px(逐行实测 67 字符 ≤72)**([`layout::measure_cap_px`]),
|
||||
//! 由 [`layout::content_column_width`] / [`layout::frame_metrics`] **无条件施加**,
|
||||
//! 页面拿不到「更宽」的选项。
|
||||
//!
|
||||
|
||||
Reference in new issue
Block a user