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

+4
View File
@@ -338,6 +338,10 @@ pub(crate) fn tokenize_run(text: &str) -> Vec<Tok> {
let mut toks = Vec::new();
let mut chars = text.chars().peekable();
while let Some(ch) = chars.next() {
// A direction mark only steers shaping; it draws nothing.
if ch == crate::scene::text::ttf_glyph::LRM {
continue;
}
if ch == '\\' {
match chars.peek().copied() {
Some('L') => {