From 5e515725c62a55eac47ba35c348cd02c3a4dec77 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 7 Oct 2026 22:57:58 -0400 Subject: [PATCH] IDML: one reader and writer for the paragraph Kashidas attribute The paragraph Kashidas attribute is imported and exported by the Arabic attribute code; the second copy in the paragraph defaults, which read and wrote the same values, is gone. --- crates/idml/src/export.rs | 3 --- crates/idml/src/import.rs | 1 - crates/idml/src/names.rs | 7 ------- 3 files changed, 11 deletions(-) diff --git a/crates/idml/src/export.rs b/crates/idml/src/export.rs index c62674409..fcd688284 100644 --- a/crates/idml/src/export.rs +++ b/crates/idml/src/export.rs @@ -1360,9 +1360,6 @@ impl<'a> Ex<'a> { if let Some(v) = a.single_word_justify { el.set("SingleWordJustification", names::align_out(v)); } - if let Some(v) = a.kashidas { - el.set("Kashidas", names::kashidas_out(v)); - } n!(keep_with_next, "KeepWithNext"); b!(keep_lines_together, "KeepLinesTogether"); b!(keep_all_lines, "KeepAllLinesTogether"); diff --git a/crates/idml/src/import.rs b/crates/idml/src/import.rs index e51f1d81b..22fb03420 100644 --- a/crates/idml/src/import.rs +++ b/crates/idml/src/import.rs @@ -1286,7 +1286,6 @@ impl<'r> Importer<'r> { a.glyph_scale_max = frac("MaximumGlyphScaling"); a.auto_leading = frac("AutoLeading"); a.single_word_justify = e.prop("SingleWordJustification").and_then(|v| names::align_in(v.trim())); - a.kashidas = e.prop("Kashidas").and_then(|v| names::kashidas_in(v.trim())); a.keep_with_next = u("KeepWithNext"); a.keep_lines_together = e.boolean("KeepLinesTogether"); a.keep_all_lines = e.boolean("KeepAllLinesTogether"); diff --git a/crates/idml/src/names.rs b/crates/idml/src/names.rs index 9a1c4ca1b..daa57d5fb 100644 --- a/crates/idml/src/names.rs +++ b/crates/idml/src/names.rs @@ -447,13 +447,6 @@ pub fn auto_size_in(s: &str) -> AutoSize { .find(|m| auto_size_out(*m) == s) .unwrap_or(AutoSize::Off) } -/// Insert Kashidas (`Kashidas`): InDesign's default, or off. -pub fn kashidas_out(on: bool) -> &'static str { - if on { "DefaultKashidas" } else { "KashidasOff" } -} -pub fn kashidas_in(s: &str) -> Option { - [true, false].into_iter().find(|on| kashidas_out(*on) == s) -} /// Auto-size reference points in our 0..9 order (row-major, top-left first). pub const REF_POINTS: [&str; 9] = [