review(#1629): one direction mark, no dead RTL paragraph path, tests follow the new layout

- One visible-named LRM constant (ttf_glyph) instead of two invisible
  literals. Stroke and SDF text skip it, so a right-to-left script the
  shaper does not handle no longer gets a 6-unit gap per mark; vertical
  MTEXT does not insert it at all.
- Shaped cells keep a cluster the shaper merged into the leading mark.
- The always-false RTL paragraph flag, its indent/anchor branches and the
  unused reorder_line_atoms are gone; its test now covers reorder_rtl_runs.
- Underline, overline and strike follow each drawn run of a mixed word.
- Justify/distribute count only the gaps the measured width holds.
- The two RTL alignment tests assert the new left-to-right behaviour;
  glyph_boxes keeps its own doc comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-06 20:49:01 +03:00
1 parent 36871044a6
commit 864c644222
5 files changed
+99 -242

No files matched your search

+7 -3
View File
@@ -705,9 +705,13 @@ mod tests {
let doc = codec::CadDocument::default();
let placement = text_run_placement_at_scale(&t, &doc, 1.0);
// For Arabic text with default HA::Left, origin should be shifted left
// so the right edge of the text sits at the insertion point (X = 10.0).
assert!(placement.origin[0] < 10.0, "Arabic text origin must be to the left of insertion point: origin_x={}", placement.origin[0]);
// Left alignment does not depend on the script: Arabic text starts
// at the insertion point like any other.
assert!(
(placement.origin[0] - 10.0).abs() < 1e-9,
"Left-aligned Arabic text starts at the insertion point: origin_x={}",
placement.origin[0]
);
}
}