Mojikumi: test consecutive punctuation under the one-em line-end set too

The close-up test checked the half-em line-end set only; the other Japanese
base set closes up the same pairs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
con3codeandClaude Opus 5.5 committed 2026-11-04 09:01:20 +09:00
1 parent 823eef9838
commit 3894566812
1 file changed
+6 -3
+6 -3
View File
@@ -6170,7 +6170,8 @@ fn mojikumi_one_em_line_end_set_sets_closing_punctuation_full_width_at_line_end(
}
/// Consecutive punctuation touches (JLREQ 3.1.4): in 漢」。漢(「漢 the closing bracket and
/// the full stop, and the two opening brackets, close up by half an em each.
/// the full stop, and the two opening brackets, close up by half an em each, under both
/// Japanese base sets (the full stop isn't at the line end, so the line-end rule doesn't apply).
#[test]
fn mojikumi_closes_up_consecutive_punctuation() {
let family = "Mojikumi Consecutive";
@@ -6187,8 +6188,10 @@ fn mojikumi_closes_up_consecutive_punctuation() {
(line.end_x - line.x0, g.face.units_per_em() * g.sx)
};
let (natural, em) = width("Nothing");
let (set, _) = width("LineEndAllOneHalfEmEnum");
assert!((natural - set - em).abs() < 0.01, "{natural} - {set} should be one em ({em})");
for name in ["LineEndAllOneHalfEmEnum", "LineEndAllOneEmEnum"] {
let (set, _) = width(name);
assert!((natural - set - em).abs() < 0.01, "{name}: {natural} - {set} should be one em ({em})");
}
}
fn ruled(text: &str, rect: Rect, columns: u32, edit: impl FnOnce(&mut Document, StoryId)) -> (Document, ItemId, Vec<Rect>) {