forked from 1b-agent/opencadstudio-upstream
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:
1 parent
36871044a6
commit
864c644222
5 files changed
+99
-242
No files matched your search
@@ -79,10 +79,6 @@ fn drawing_dir_str(d: &DrawingDirection) -> &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
/// Per-visible-character world-space boxes for the MText editor's
|
||||
/// click-to-select preview. Uses the exact same layout opts as `to_render`
|
||||
/// so the boxes line up with the rendered glyphs.
|
||||
|
||||
/// The text MTEXT lays out: its stored value, except that the spaces between
|
||||
/// a field's value and a right-to-left word right after it read with that
|
||||
/// word — the reference draws `שלום 0 עולם` with no gap after the field
|
||||
@@ -111,6 +107,9 @@ fn display_text(t: &MText, document: &codec::CadDocument) -> String {
|
||||
out
|
||||
}
|
||||
|
||||
/// Per-visible-character world-space boxes for the MText editor's
|
||||
/// click-to-select preview. Uses the exact same layout opts as `to_render`
|
||||
/// so the boxes line up with the rendered glyphs.
|
||||
pub fn glyph_boxes(t: &MText, document: &codec::CadDocument) -> Vec<GlyphBox> {
|
||||
let resolved_style = resolve_text_style(&t.style, document);
|
||||
let attach_h_anchor: f32 = match t.attachment_point {
|
||||
|
||||
Reference in new issue
Block a user