DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Paragraph Shading and Border pages laid out as InDesign's, with Overprint
moppeeer028e950f97aa
diff --git a/ROADMAP.md b/ROADMAP.mdindex 518f8e387..ebfbbcc26 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -348,6 +348,7 @@ list) · [roadmap.md](docs/roadmap.md) (milestones, plan) · [parity-checklist.mNewest first.+- **2026-10-22** · Paragraph Style Options › Paragraph Shading and Paragraph Border are laid out as InDesign's: headed with the page's name; Tint is a spinner with InDesign's presets and has Overprint beside it (shading, border and gap; a new attribute each, kept through IDML; PDF export warns it doesn't overprint yet); Corner Size and Shape is InDesign's two-by-two grid of corner icons, sizes and shape menus showing each shape's glyph, with the link in the middle; offsets and weights have spinners. Found in the Learn Skills Daily course, chapter 41. No readiness percentage change.- **2026-10-16** · Edit › Keyboard Shortcuts imports a set saved by InDesign's Show Set (.txt, Windows or Mac key names, UTF-8 or UTF-16): matched commands take its Default shortcuts or lose theirs, other commands give up keys it takes, and a report lists what it changed and the items it could not match (`window.importShortcuts`, #1180). Tool keys stay fixed. No readiness percentage change.- **2026-10-22** · A ruler guide dragged with the Selection tools, out of a ruler, on its own or with other selected guides, snaps along its axis as objects do (#1221): to other ruler guides, margins, columns, bleed, page and object edges and centers (with the smart-guide mark) and the document grid, within the snap zone and following Snap to Guides and Smart Guides. Shift snaps to the ruler's ticks and Cmd suspends snapping. The preview line, the position readout and the drop use the same snapped position. No readiness percentage change.- **2026-10-22** · macOS: the app menu has a Language submenu after Settings… with each interface language in its own name and the current one checked, as in the suite's other apps; Preferences › General › Interface Language stays. No readiness percentage change.diff --git a/crates/compose/src/lib.rs b/crates/compose/src/lib.rsindex 89ea89bd3..a9b712163 100644--- a/crates/compose/src/lib.rs+++ b/crates/compose/src/lib.rs@@ -252,6 +252,8 @@ pub struct Deco {pub path: Option<designcraft_geom::BezPath>,/// Shown on screen only (not printed or exported).pub nonprinting: bool,+ /// Set to overprint (paragraph shading or border); PDF export doesn't overprint yet.+ pub overprint: bool,}#[derive(Clone, Debug, Default)]diff --git a/crates/compose/src/parabox.rs b/crates/compose/src/parabox.rsindex b8b58cb44..314679d51 100644--- a/crates/compose/src/parabox.rs+++ b/crates/compose/src/parabox.rs@@ -32,6 +32,7 @@ struct Shading {bottom: BoxBottom,clip: bool,nonprinting: bool,+ overprint: bool,}#[derive(Clone, Debug, PartialEq)]@@ -51,6 +52,8 @@ struct Border {display_if_splits: bool,gap_color: String,gap_tint: f32,+ overprint: bool,+ gap_overprint: bool,}fn finite(v: f64) -> f64 {@@ -72,6 +75,7 @@ impl ParaBox {bottom: pp.shading_bottom,clip: pp.shading_clip,nonprinting: pp.shading_nonprinting,+ overprint: pp.shading_overprint,});let border = pp.border_on.then(|| Border {color: pp.border_color.clone(),@@ -88,6 +92,8 @@ impl ParaBox {display_if_splits: pp.border_display_if_splits,gap_color: pp.border_gap_color.clone(),gap_tint: pp.border_gap_tint,+ overprint: pp.border_overprint,+ gap_overprint: pp.border_gap_overprint,});Some(ParaBox { shading, border, merge: pp.border_merge })}@@ -149,7 +155,11 @@ fn group_decos(out: &ComposedStory, paras: std::ops::RangeInclusive<usize>, b: &// Corners stay square where the box is cut by a split.let corners = cut_corners(s.corners, !first_part, !last_part);let path = (!corners.iter().all(Corner::is_none)).then(|| box_outline(rect, &corners, [true; 4]));- decos.push((part.fi, true, Deco { rect, color: s.color.clone(), tint: s.tint, path, nonprinting: s.nonprinting }));+ decos.push((+ part.fi,+ true,+ Deco { rect, color: s.color.clone(), tint: s.tint, path, nonprinting: s.nonprinting, overprint: s.overprint },+ ));}}if let Some(bd) = &b.border@@ -160,15 +170,14 @@ fn group_decos(out: &ComposedStory, paras: std::ops::RangeInclusive<usize>, b: &let open_top = !first_part && !bd.display_if_splits;let open_bottom = !last_part && !bd.display_if_splits;for (path, gap) in border_paths(bd, o, open_top, open_bottom) {- let (color, tint) = if gap { (bd.gap_color.clone(), bd.gap_tint) } else { (bd.color.clone(), bd.tint) };- decos.push((part.fi, false, Deco { rect: path.bounding_box(), color, tint, path: Some(path), nonprinting: false }));+ let (color, tint, overprint) =+ if gap { (bd.gap_color.clone(), bd.gap_tint, bd.gap_overprint) } else { (bd.color.clone(), bd.tint, bd.overprint) };+ decos.push((part.fi, false, Deco { rect: path.bounding_box(), color, tint, path: Some(path), nonprinting: false, overprint }));}if is_plain(bd, open_top, open_bottom) {- decos.extend(- plain_edges(bd, o, open_top, open_bottom)- .into_iter()- .map(|rect| (part.fi, false, Deco { rect, color: bd.color.clone(), tint: bd.tint, path: None, nonprinting: false })),- );+ decos.extend(plain_edges(bd, o, open_top, open_bottom).into_iter().map(|rect| {+ (part.fi, false, Deco { rect, color: bd.color.clone(), tint: bd.tint, path: None, nonprinting: false, overprint: bd.overprint })+ }));}}}diff --git a/crates/doc/src/attrs.rs b/crates/doc/src/attrs.rsindex 077637672..ca90a2d31 100644--- a/crates/doc/src/attrs.rs+++ b/crates/doc/src/attrs.rs@@ -1304,6 +1304,9 @@ attr_set! {shading_on: bool = false,shading_color: String = "[Black]".into(),shading_tint: f32 = 0.2,+ /// Overprint (InDesign's Paragraph Shading › Overprint): stored and kept through IDML;+ /// PDF export doesn't overprint yet.+ shading_overprint: bool = false,shading_offsets: [f64; 4] = [0.0; 4],/// Paragraph border: stroke weights (top, left, bottom, right), colour, and offsets past the/// text (top, left, bottom, right).@@ -1311,6 +1314,8 @@ attr_set! {border_weights: [f64; 4] = [1.0; 4],border_color: String = "[Black]".into(),border_tint: f32 = 1.0,+ /// Overprint the border's stroke (stored and kept through IDML, as `shading_overprint`).+ border_overprint: bool = false,border_offsets: [f64; 4] = [0.0; 4],/// The border's stroke type (a document stroke style by name, or a built-in type), cap and/// join.@@ -1330,6 +1335,8 @@ attr_set! {/// The colour between the dashes, dots or stripes of a border that isn't solid.border_gap_color: String = "[None]".into(),border_gap_tint: f32 = 1.0,+ /// Overprint the border's gap colour (stored and kept through IDML).+ border_gap_overprint: bool = false,/// Shading corners: top left, top right, bottom right, bottom left.shading_corners: [designcraft_geom::corners::Corner; 4] = [designcraft_geom::corners::Corner::default(); 4],shading_width: BoxWidth = BoxWidth::Column,diff --git a/crates/idml/src/export.rs b/crates/idml/src/export.rsindex 99dcb383e..544b43566 100644--- a/crates/idml/src/export.rs+++ b/crates/idml/src/export.rs@@ -1641,6 +1641,7 @@ impl<'a> Ex<'a> {props.push(p("ParagraphShadingColor", "object", self.sw(c)));}n!(shading_tint, "ParagraphShadingTint", pct);+ b!(shading_overprint, "ParagraphShadingOverprint");const SIDES: [&str; 4] = ["Top", "Left", "Bottom", "Right"];if let Some(o) = a.shading_offsets {for (i, side) in SIDES.iter().enumerate() {@@ -1652,6 +1653,7 @@ impl<'a> Ex<'a> {props.push(p("ParagraphBorderColor", "object", self.sw(c)));}n!(border_tint, "ParagraphBorderTint", pct);+ b!(border_overprint, "ParagraphBorderOverprint");if let Some(w) = a.border_weights {for (i, side) in SIDES.iter().enumerate() {el.set(&format!("ParagraphBorder{side}LineWeight"), num(w[i]));@@ -1695,6 +1697,7 @@ impl<'a> Ex<'a> {props.push(p("ParagraphBorderGapColor", "object", self.sw(c)));}n!(border_gap_tint, "ParagraphBorderGapTint", pct);+ b!(border_gap_overprint, "ParagraphBorderGapOverprint");if let Some(w) = a.shading_width {el.set("ParagraphShadingWidth", names::box_width_out(w));}diff --git a/crates/idml/src/import.rs b/crates/idml/src/import.rsindex ef504065e..fb51a6b4b 100644--- a/crates/idml/src/import.rs+++ b/crates/idml/src/import.rs@@ -1879,6 +1879,7 @@ impl<'r> Importer<'r> {a.shading_color = Some(self.swatch_ref(c.trim()));}a.shading_tint = tint(e.num("ParagraphShadingTint"));+ a.shading_overprint = e.boolean("ParagraphShadingOverprint");let sides = |f: &dyn Fn(&str) -> String| -> Option<[f64; 4]> {let v = ["Top", "Left", "Bottom", "Right"].map(|s| e.num(&f(s)));v.iter().any(Option::is_some).then(|| v.map(|x| x.unwrap_or(0.0)))@@ -1889,6 +1890,7 @@ impl<'r> Importer<'r> {a.border_color = Some(self.swatch_ref(c.trim()));}a.border_tint = tint(e.num("ParagraphBorderTint"));+ a.border_overprint = e.boolean("ParagraphBorderOverprint");a.border_weights = sides(&|s| format!("ParagraphBorder{s}LineWeight"));a.border_offsets = sides(&|s| format!("ParagraphBorder{s}Offset"));a.border_type = e.prop("ParagraphBorderType").map(|v| names::stroke_type_in(v.trim()));@@ -1904,6 +1906,7 @@ impl<'r> Importer<'r> {a.border_gap_color = Some(self.swatch_ref(c.trim()));}a.border_gap_tint = tint(e.num("ParagraphBorderGapTint"));+ a.border_gap_overprint = e.boolean("ParagraphBorderGapOverprint");a.shading_corners = corners(e, "ParagraphShading");a.shading_width = e.prop("ParagraphShadingWidth").map(|v| names::box_width_in(v.trim()));a.shading_top = e.prop("ParagraphShadingTopOrigin").map(|v| names::box_top_in(v.trim()));diff --git a/crates/idml/src/tests.rs b/crates/idml/src/tests.rsindex 37fb2af50..13be526e5 100644--- a/crates/idml/src/tests.rs+++ b/crates/idml/src/tests.rs@@ -333,6 +333,9 @@ fn indesign_text_defaults() -> Vec<AttrRow> {"ParagraphBorderOn": "false" => false, "true" => true, |r| r.0.border_on;"ParagraphBorderColor": "Color/Black" => "[Black]", "Swatch/None" => "[None]", |r| r.0.border_color;"ParagraphBorderTint": "-1" => 1.0f32, "50" => 0.5f32, |r| r.0.border_tint;+ "ParagraphShadingOverprint": "false" => false, "true" => true, |r| r.0.shading_overprint;+ "ParagraphBorderOverprint": "false" => false, "true" => true, |r| r.0.border_overprint;+ "ParagraphBorderGapOverprint": "false" => false, "true" => true, |r| r.0.border_gap_overprint;"FontStyle": "Regular" => "Regular", "Bold" => "Bold", |r| r.1.font_style;"PointSize": "12" => 12.0, "9" => 9.0, |r| r.1.size;"Leading": "Auto" => Leading::Auto, "14" => Leading::Points(14.0), |r| r.1.leading;diff --git a/crates/pdf/src/text.rs b/crates/pdf/src/text.rsindex 300a47d93..571a65e9b 100644--- a/crates/pdf/src/text.rs+++ b/crates/pdf/src/text.rs@@ -237,6 +237,9 @@ impl Exporter<'_> {// Paragraph shading and rules under the text.self.as_artifact(s, |me, s| {for d in ft.decos.iter().filter(|d| !d.nonprinting) {+ if d.overprint {+ me.warn("overprint is not exported yet");+ }if let Some(c) = me.swatch_color(&d.color, d.tint) {match &d.path {Some(p) => me.fill_path(s, p, c),diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex 432c69194..891fc01b8 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -4205,8 +4205,13 @@ fn paragraph_style_options(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialo"openType" => open_type_features(&app.ui.language, ui, d, &CharFields { base: &cv, sparse: false }),"underline" => line_options(&app.ui.language, ui, d, &CharFields { base: &cv, sparse: false }, &doc, "underline"),"strikethrough" => line_options(&app.ui.language, ui, d, &CharFields { base: &cv, sparse: false }, &doc, "strikethrough"),- "border" => border_shading(&app.ui.language, ui, d, &pv, &doc, true),- "shading" => border_shading(&app.ui.language, ui, d, &pv, &doc, false),+ "border" | "shading" => {+ let border = d.s("section") == "border";+ let title = if border { "Paragraph Border" } else { "Paragraph Shading" };+ crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, title)).size(14.0));+ ui.add_space(6.0);+ border_shading(&app.ui.language, ui, d, &pv, &doc, border);+ }"keep" => keep_options(&app.ui.language, ui, d, &pv),"span" => span_columns(&app.ui.language, ui, d, &pv, &doc),"bullets" => {@@ -4469,9 +4474,14 @@ fn para_measure(ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, key: &str, unit:/// A paragraph attribute chosen from `opts` (serialized value, label).fn para_choice(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, key: &str, opts: &[(&str, &str)]) {+ para_choice_width(lang, ui, d, pv, key, opts, 200.0);+}++/// [`para_choice`] `width` wide.+fn para_choice_width(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, key: &str, opts: &[(&str, &str)], width: f32) {let cur = para_value(d, pv, key);let shown = opts.iter().find(|o| cur == o.0).map_or("", |o| crate::i18n::tr(lang, o.1));- egui::ComboBox::from_id_salt(("pschoice", key)).selected_text(crate::rtl::widget(ui, shown)).width(200.0).show_ui(ui, |ui| {+ egui::ComboBox::from_id_salt(("pschoice", key)).selected_text(crate::rtl::widget(ui, shown)).width(width).show_ui(ui, |ui| {for (v, label) in opts {if ui.selectable_label(cur == *v, crate::rtl::widget(ui, crate::i18n::tr(lang, label))).clicked() {para_set(d, key, json!(v));@@ -4585,36 +4595,63 @@ fn border_type_menu(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, d}/// Corner size and shape of a border or shading (`key` holds top left, top right, bottom right,-/// bottom left); an edited corner stores all four.+/// bottom left), as InDesign lays them out: Top Left and Top Right over Bottom Left and Bottom+/// Right, each a corner icon, a size and a shape menu showing the shapes' glyphs, with the link in+/// the middle. An edited corner stores all four.fn para_corners(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, key: &str, units: Unit) {use designcraft_geom::corners::{Corner, CornerShape};let mut corners: [Corner; 4] = serde_json::from_value(para_value(d, pv, key)).unwrap_or_default();let linked = linked(d, key, corners.iter().all(|c| *c == corners[0]));let mut changed = None;let mut relinked = false;- egui::Grid::new(("pscorners", key)).num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {- for (i, label) in ["Top Left:", "Top Right:", "Bottom Right:", "Bottom Left:"].into_iter().enumerate() {- let Some(c) = corners.get_mut(i) else { continue };- crate::rtl::label(ui, crate::i18n::tr(lang, label));- if let Some(v) = crate::widgets::measure(ui, &format!("ps{key}{i}"), Some(c.size), units, 70.0) {- c.size = if v.is_finite() { v.clamp(0.0, 10_000.0) } else { 0.0 };- changed = Some(i);- }- egui::ComboBox::from_id_salt(("pscornershape", key, i))- .selected_text(crate::rtl::widget(ui, crate::i18n::tr(lang, c.shape.label())))- .width(130.0)- .show_ui(ui, |ui| {- for shape in CornerShape::ALL {- if ui.selectable_label(c.shape == shape, crate::rtl::widget(ui, crate::i18n::tr(lang, shape.label()))).clicked() {- c.shape = shape;- changed = Some(i);- }- }+ let mut corner = |ui: &mut egui::Ui, i: usize, icon: &str, tip: &str, changed: &mut Option<usize>| {+ let Some(c) = corners.get_mut(i) else { return };+ let tip = crate::i18n::tr(lang, tip);+ let (r, resp) = ui.allocate_exact_size(egui::vec2(18.0, 18.0), egui::Sense::hover());+ crate::icons::paint(ui.painter(), r, icon, crate::theme::Tokens::get(ui.ctx()).icon);+ resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Label, true, tip));+ resp.on_hover_text(tip);+ let id = format!("ps{key}{i}");+ if let Some(v) = crate::widgets::NumField::measure(&id, Some(c.size), units).width(84.0).spinner().range(0.0, 10_000.0).show(ui) {+ c.size = if v.is_finite() { v.clamp(0.0, 10_000.0) } else { 0.0 };+ *changed = Some(i);+ }+ let shape_label = crate::i18n::tr(lang, "Corner Shape");+ let shown = c.shape;+ let resp = crate::panels::properties::preview_dropdown(ui, 52.0, shape_label, |p, r| {+ crate::panels::properties::paint_corner_shape(p, r.shrink(2.0), shown, egui::Color32::BLACK)+ });+ egui::Popup::menu(&resp).show(|ui| {+ for shape in CornerShape::ALL {+ let row = crate::panels::properties::preview_row(ui, c.shape == shape, crate::i18n::tr(lang, shape.label()), 22.0, |p, r, ink| {+ crate::panels::properties::paint_corner_shape(p, r, shape, ink)});+ if row.clicked() {+ c.shape = shape;+ *changed = Some(i);+ ui.close();+ }+ }+ });+ };+ egui::Grid::new(("pscorners", key)).num_columns(3).spacing([14.0, 6.0]).show(ui, |ui| {+ for (row, [(li, licon, ltip), (ri, ricon, rtip)]) in [+ [(0, "corner-tl", "Top Left Corner"), (1, "corner-tr", "Top Right Corner")],+ [(3, "corner-bl", "Bottom Left Corner"), (2, "corner-br", "Bottom Right Corner")],+ ]+ .into_iter()+ .enumerate()+ {+ ui.horizontal(|ui| corner(ui, li, licon, ltip, &mut changed));// Linked again, the four take Top Left's size and shape.- if i == 0 && link_toggle(lang, ui, d, key, linked) {- relinked = true;+ if row == 0 {+ if link_toggle(lang, ui, d, key, linked) {+ relinked = true;+ }+ } else {+ ui.label("");}+ ui.horizontal(|ui| corner(ui, ri, ricon, rtip, &mut changed));ui.end_row();}});@@ -4631,17 +4668,23 @@ fn para_corners(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, key:}}-/// The colour and tint rows of a border, its gap or shading (`keys`: colour, tint), in a grid.+/// Tint presets (%), as InDesign's tint menus list them.+const TINTS: &[f64] = &[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0];++/// The colour and tint rows of a border, its gap or shading (`keys`: colour, tint, overprint), in+/// a grid; Overprint follows the tint, as InDesign's.+#[allow(clippy::too_many_arguments)]fn para_color_tint(+ lang: &str,ui: &mut egui::Ui,d: &mut Dialog,pv: &Value,doc: &designcraft_doc::Document,- keys: (&str, &str),+ keys: (&str, &str, &str),labels: (&str, &str),enabled: bool,) {- let (color_key, tint_key) = keys;+ let (color_key, tint_key, overprint_key) = keys;crate::rtl::label(ui, labels.0);let color = para_value(d, pv, color_key).as_str().unwrap_or("").to_string();if let Some(w) = ui.add_enabled_ui(enabled, |ui| swatch_menu(ui, doc, ("pscolor", color_key), &color, 160.0)).inner {@@ -4649,10 +4692,18 @@ fn para_color_tint(}ui.end_row();crate::rtl::label(ui, labels.1);- let tint = para_value(d, pv, tint_key).as_f64().map(|t| t * 100.0);- if let Some(v) = ui.add_enabled_ui(enabled, |ui| crate::widgets::number(ui, &format!("ps{tint_key}"), tint, "%", 60.0, 0)).inner {- para_set(d, tint_key, json!(if v.is_finite() { (v / 100.0).clamp(0.0, 1.0) } else { 1.0 }));- }+ let tint = para_value(d, pv, tint_key).as_f64().map(|t| (t * 1000.0).round() / 10.0);+ ui.add_enabled_ui(enabled, |ui| {+ ui.horizontal(|ui| {+ let id = format!("ps{tint_key}");+ let field = crate::widgets::NumField::number(&id, tint, "%", 0).width(96.0).spinner().presets(TINTS).step(10.0).range(0.0, 100.0);+ if let Some(v) = field.show(ui) {+ para_set(d, tint_key, json!(if v.is_finite() { (v / 100.0).clamp(0.0, 1.0) } else { 1.0 }));+ }+ ui.add_space(8.0);+ para_check(ui, d, pv, overprint_key, crate::i18n::tr(lang, "Overprint"));+ });+ });ui.end_row();}@@ -4670,12 +4721,17 @@ fn border_shading(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, doccrate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(lang, t)).font(semibold(12.0)));};ui.add_space(4.0);- egui::ScrollArea::vertical().id_salt(("psbsscroll", border)).max_height(330.0).show(ui, |ui| {+ egui::ScrollArea::vertical().id_salt(("psbsscroll", border)).max_height(400.0).show(ui, |ui| {ui.add_enabled_ui(on, |ui| {if border {head(ui, "Stroke");para_sides(lang, ui, d, pv, &key("Weights"), &|ui: &mut egui::Ui, id: &str, v: Option<f64>| {- crate::widgets::number(ui, id, v, " pt", 60.0, 2).map(|w| if w.is_finite() { w.clamp(0.0, 1000.0) } else { 0.0 })+ crate::widgets::NumField::number(id, v, " pt", 2)+ .width(84.0)+ .spinner()+ .range(0.0, 1000.0)+ .show(ui)+ .map(|w| if w.is_finite() { w.clamp(0.0, 1000.0) } else { 0.0 })});ui.add_space(4.0);} else {@@ -4688,12 +4744,12 @@ fn border_shading(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, docui.end_row();}let (color, tint) = (crate::i18n::tr(lang, "Color:"), crate::i18n::tr(lang, "Tint:"));- para_color_tint(ui, d, pv, doc, (&key("Color"), &key("Tint")), (color, tint), true);+ para_color_tint(lang, ui, d, pv, doc, (&key("Color"), &key("Tint"), &key("Overprint")), (color, tint), true);if border {// The gap colour shows between the dashes, dots or stripes.let solid = para_value(d, pv, "borderType").get("kind").and_then(Value::as_str).is_none_or(|k| k == "solid");let (gap, gap_tint) = (crate::i18n::tr(lang, "Gap Color:"), crate::i18n::tr(lang, "Gap Tint:"));- para_color_tint(ui, d, pv, doc, ("borderGapColor", "borderGapTint"), (gap, gap_tint), !solid);+ para_color_tint(lang, ui, d, pv, doc, ("borderGapColor", "borderGapTint", "borderGapOverprint"), (gap, gap_tint), !solid);crate::rtl::label(ui, crate::i18n::tr(lang, "Cap:"));para_choice(lang, ui, d, pv, "borderCap", &[("butt", "Butt"), ("round", "Round"), ("projecting", "Projecting")]);ui.end_row();@@ -4704,28 +4760,45 @@ fn border_shading(lang: &str, ui: &mut egui::Ui, d: &mut Dialog, pv: &Value, doc});head(ui, "Corner Size and Shape");para_corners(lang, ui, d, pv, &key("Corners"), units);- head(ui, "Offsets");- para_sides(lang, ui, d, pv, &key("Offsets"), &|ui: &mut egui::Ui, id: &str, v: Option<f64>| {- crate::widgets::measure(ui, id, v, units, 60.0)- });- ui.add_space(4.0);- egui::Grid::new(("psbsedges", border)).num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {- crate::rtl::label(ui, crate::i18n::tr(lang, "Top Edge:"));- para_choice(- lang,- ui,- d,- pv,- &key("Top"),- &[("ascent", "Ascent"), ("baseline", "Baseline"), ("emBox", "Em Box Top"), ("leading", "Leading")],- );- ui.end_row();- crate::rtl::label(ui, crate::i18n::tr(lang, "Bottom Edge:"));- para_choice(lang, ui, d, pv, &key("Bottom"), &[("descent", "Descent"), ("baseline", "Baseline"), ("emBox", "Em Box Bottom")]);- ui.end_row();- crate::rtl::label(ui, crate::i18n::tr(lang, "Width:"));- para_choice(lang, ui, d, pv, &key("Width"), &[("column", "Column"), ("text", "Text")]);- ui.end_row();+ // The offsets, and beside them the edges and width the box follows, as InDesign's.+ ui.horizontal_top(|ui| {+ ui.vertical(|ui| {+ head(ui, "Offsets");+ para_sides(lang, ui, d, pv, &key("Offsets"), &|ui: &mut egui::Ui, id: &str, v: Option<f64>| {+ crate::widgets::spin_measure(ui, id, v, units, 72.0)+ });+ });+ ui.add_space(12.0);+ ui.vertical(|ui| {+ head(ui, "");+ egui::Grid::new(("psbsedges", border)).num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(lang, "Top Edge:"));+ para_choice_width(+ lang,+ ui,+ d,+ pv,+ &key("Top"),+ &[("ascent", "Ascent"), ("baseline", "Baseline"), ("emBox", "Em Box Top"), ("leading", "Leading")],+ 92.0,+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(lang, "Bottom Edge:"));+ para_choice_width(+ lang,+ ui,+ d,+ pv,+ &key("Bottom"),+ &[("descent", "Descent"), ("baseline", "Baseline"), ("emBox", "Em Box Bottom")],+ 92.0,+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(lang, "Width:"));+ para_choice_width(lang, ui, d, pv, &key("Width"), &[("column", "Column"), ("text", "Text")], 92.0);+ ui.end_row();+ });+ });});ui.add_space(4.0);if border {@@ -9276,13 +9349,13 @@ mod tests {retype_beside(&mut h, "Left:", 0, "10");assert_eq!(field(&h, "borderWeights"), json!([3.0, 10.0, 3.0, 3.0]));// The corners start the same too: Top Left's size goes to all four.- retype_beside(&mut h, "Top Left:", 0, "0p4");+ retype_beside(&mut h, "Top Left Corner", 0, "0p4");let corners = field(&h, "borderCorners");assert!((0..4).all(|i| corners[i]["size"] == json!(4.0)), "{corners}");// Unlinked, Top Right alone takes 0p8; linked again, all four take Top Left's 4 pt.let at = link(&h, 1);crate::test_window::click_at(&mut h, at);- retype_beside(&mut h, "Top Right:", 0, "0p8");+ retype_beside(&mut h, "Top Right Corner", 0, "0p8");assert_eq!(field(&h, "borderCorners")[1]["size"], json!(8.0));assert_eq!(field(&h, "borderCorners")[0]["size"], json!(4.0));let at = link(&h, 1);@@ -9294,6 +9367,57 @@ mod tests {assert_eq!(style.para.border_weights, Some([3.0, 10.0, 3.0, 3.0]));}+ /// The course's chapter 41: Paragraph Shading as InDesign's. The page is headed with its name;+ /// the tint has Overprint beside it; the corners are a two-by-two grid whose shape menus show+ /// the shapes. The lesson rounds the top two corners at 10 pt, unlinked, and moves the+ /// offsets.+ #[test]+ fn paragraph_shading_page_is_laid_out_as_indesigns() {+ use designcraft_geom::corners::CornerShape;+ use egui_kittest::kittest::Queryable;+ let (app, _) = ruled_paragraph();+ let mut h = crate::test_window::open(app, egui::vec2(1400.0, 900.0));+ h.state_mut().app.ui.dialog =+ Some(Dialog::new("paragraphStyleOptions", json!({"name": "Ruled Child", "section": "shading", "p.shadingOn": true})));+ h.run_steps(4);+ let field = |h: &egui_kittest::Harness<'static, crate::test_window::Window>, key: &str| {+ h.state().app.ui.dialog.as_ref().and_then(|d| d.fields.get(&format!("p.{key}")).cloned()).unwrap_or_default()+ };+ assert!(h.get_all_by_label("Paragraph Shading").count() >= 2, "the section list and the page's heading");+ h.get_by_label("Overprint").click();+ h.run_steps(2);+ assert_eq!(field(&h, "shadingOverprint"), json!(true));+ // The corners' link (0) and the offsets' (1).+ let link = |h: &egui_kittest::Harness<'static, crate::test_window::Window>, n: usize| {+ let links: Vec<egui::Rect> = h.get_all_by_label("Make all settings the same").map(|n| n.rect()).collect();+ assert_eq!(links.len(), 2, "corners and offsets each have a link");+ links[n].center()+ };+ let at = link(&h, 0);+ crate::test_window::click_at(&mut h, at);+ for (corner, nth) in [("Top Left Corner", 0), ("Top Right Corner", 1)] {+ retype_beside(&mut h, corner, 0, "10 pt");+ h.get_all_by_label("Corner Shape").nth(nth).unwrap().click();+ h.run_steps(2);+ h.get_by_label("Rounded").click();+ h.run_steps(2);+ }+ let corners: [designcraft_geom::corners::Corner; 4] = serde_json::from_value(field(&h, "shadingCorners")).unwrap();+ assert_eq!(+ corners.map(|c| (c.shape, c.size)),+ [(CornerShape::Rounded, 10.0), (CornerShape::Rounded, 10.0), (CornerShape::None, 0.0), (CornerShape::None, 0.0)]+ );+ // The offsets, unlinked: Top alone.+ let at = link(&h, 1);+ crate::test_window::click_at(&mut h, at);+ retype_beside(&mut h, "Top:", 0, "3 pt");+ assert_eq!(field(&h, "shadingOffsets"), json!([3.0, 0.0, 0.0, 0.0]));+ confirm(&mut h.state_mut().app).unwrap();+ let style = h.state().app.session.doc().unwrap().doc.styles.para("Ruled Child").cloned().unwrap();+ assert_eq!((style.para.shading_on, style.para.shading_overprint), (Some(true), Some(true)));+ assert_eq!(style.para.shading_corners.map(|c| c[1].shape), Some(CornerShape::Rounded));+ }+#[test]fn paragraph_style_options_tabs_section_adds_a_stop_on_its_ruler() {use egui_kittest::kittest::Queryable;diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rsindex b75668873..3d0d0afb2 100644--- a/crates/ui-egui/src/i18n.rs+++ b/crates/ui-egui/src/i18n.rs@@ -1002,6 +1002,11 @@ const TABLE: &[(&str, [&str; 5])] = &[],),("Load Styles", ["Formate laden", "Charger les styles", "Cargar estilos", "スタイルを読み込み", "加载样式"]),+ ("Overprint", ["Überdrucken", "Surimpression", "Sobreimprimir", "オーバープリント", "叠印"]),+ ("Top Left Corner", ["Ecke oben links", "Angle supérieur gauche", "Esquina superior izquierda", "左上角", "左上角"]),+ ("Top Right Corner", ["Ecke oben rechts", "Angle supérieur droit", "Esquina superior derecha", "右上角", "右上角"]),+ ("Bottom Left Corner", ["Ecke unten links", "Angle inférieur gauche", "Esquina inferior izquierda", "左下角", "左下角"]),+ ("Bottom Right Corner", ["Ecke unten rechts", "Angle inférieur droit", "Esquina inferior derecha", "右下角", "右下角"]),("Differs from this document",["Weicht von diesem Dokument ab", "Diffère de ce document", "Difiere de este documento", "このドキュメントと異なります", "与此文档不同"],diff --git a/crates/ui-egui/src/i18n/ar.rs b/crates/ui-egui/src/i18n/ar.rsindex fa40986ff..afcd8dfa3 100644--- a/crates/ui-egui/src/i18n/ar.rs+++ b/crates/ui-egui/src/i18n/ar.rs@@ -30,6 +30,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "قص"),("Copy", "نسخ"),("Paste", "لصق"),+ ("Overprint", "طباعة فوقية"),+ ("Top Left Corner", "الزاوية العلوية اليسرى"),+ ("Top Right Corner", "الزاوية العلوية اليمنى"),+ ("Bottom Left Corner", "الزاوية السفلية اليسرى"),+ ("Bottom Right Corner", "الزاوية السفلية اليمنى"),("Stroke Type", "نوع الحد"),("Corner Shape", "شكل الزاوية"),("Paste Vector Art", "لصق رسم متجه"),diff --git a/crates/ui-egui/src/i18n/cs.rs b/crates/ui-egui/src/i18n/cs.rsindex 0e7ac2c28..261ee3af6 100644--- a/crates/ui-egui/src/i18n/cs.rs+++ b/crates/ui-egui/src/i18n/cs.rs@@ -31,6 +31,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Vyjmout"),("Copy", "Kopírovat"),("Paste", "Vložit"),+ ("Overprint", "Přetisk"),+ ("Top Left Corner", "Levý horní roh"),+ ("Top Right Corner", "Pravý horní roh"),+ ("Bottom Left Corner", "Levý dolní roh"),+ ("Bottom Right Corner", "Pravý dolní roh"),("Stroke Type", "Typ tahu"),("Corner Shape", "Tvar rohu"),("Reverse Path", "Obrátit cestu"),diff --git a/crates/ui-egui/src/i18n/de.rs b/crates/ui-egui/src/i18n/de.rsindex fc1b2c8a6..708943cd6 100644--- a/crates/ui-egui/src/i18n/de.rs+++ b/crates/ui-egui/src/i18n/de.rs@@ -31,6 +31,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Ausschneiden"),("Copy", "Kopieren"),("Paste", "Einfügen"),+ ("Overprint", "Überdrucken"),+ ("Top Left Corner", "Ecke oben links"),+ ("Top Right Corner", "Ecke oben rechts"),+ ("Bottom Left Corner", "Ecke unten links"),+ ("Bottom Right Corner", "Ecke unten rechts"),("Stroke Type", "Konturtyp"),("Corner Shape", "Eckenform"),("Inches Decimal", "Zoll dezimal"),diff --git a/crates/ui-egui/src/i18n/it.rs b/crates/ui-egui/src/i18n/it.rsindex 56471912c..274127a76 100644--- a/crates/ui-egui/src/i18n/it.rs+++ b/crates/ui-egui/src/i18n/it.rs@@ -28,6 +28,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Taglia"),("Copy", "Copia"),("Paste", "Incolla"),+ ("Overprint", "Sovrastampa"),+ ("Top Left Corner", "Angolo superiore sinistro"),+ ("Top Right Corner", "Angolo superiore destro"),+ ("Bottom Left Corner", "Angolo inferiore sinistro"),+ ("Bottom Right Corner", "Angolo inferiore destro"),("Stroke Type", "Tipo traccia"),("Corner Shape", "Forma angolo"),("Paste Vector Art", "Incolla grafica vettoriale"),diff --git a/crates/ui-egui/src/i18n/ja.rs b/crates/ui-egui/src/i18n/ja.rsindex 7de0d4d3f..9a8d9e9f0 100644--- a/crates/ui-egui/src/i18n/ja.rs+++ b/crates/ui-egui/src/i18n/ja.rs@@ -30,6 +30,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "カット"),("Copy", "コピー"),("Paste", "ペースト"),+ ("Overprint", "オーバープリント"),+ ("Top Left Corner", "左上角"),+ ("Top Right Corner", "右上角"),+ ("Bottom Left Corner", "左下角"),+ ("Bottom Right Corner", "右下角"),("Stroke Type", "線の種類"),("Corner Shape", "角のシェイプ"),("Paste Vector Art", "ベクトルアートをペースト"),diff --git a/crates/ui-egui/src/i18n/ka.rs b/crates/ui-egui/src/i18n/ka.rsindex a9c1c245c..c77354343 100644--- a/crates/ui-egui/src/i18n/ka.rs+++ b/crates/ui-egui/src/i18n/ka.rs@@ -31,6 +31,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "ამოჭრა"),("Copy", "კოპირება"),("Paste", "ჩასმა"),+ ("Overprint", "ზედაბეჭდვა"),+ ("Top Left Corner", "ზედა მარცხენა კუთხე"),+ ("Top Right Corner", "ზედა მარჯვენა კუთხე"),+ ("Bottom Left Corner", "ქვედა მარცხენა კუთხე"),+ ("Bottom Right Corner", "ქვედა მარჯვენა კუთხე"),("Stroke Type", "კონტურის ტიპი"),("Corner Shape", "კუთხის ფორმა"),("Inches Decimal", "ინჩები (ათობითი)"),diff --git a/crates/ui-egui/src/i18n/pl.rs b/crates/ui-egui/src/i18n/pl.rsindex 74d0598cd..b60abd7d4 100644--- a/crates/ui-egui/src/i18n/pl.rs+++ b/crates/ui-egui/src/i18n/pl.rs@@ -29,6 +29,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Wytnij"),("Copy", "Kopiuj"),("Paste", "Wklej"),+ ("Overprint", "Nadruk"),+ ("Top Left Corner", "Lewy górny narożnik"),+ ("Top Right Corner", "Prawy górny narożnik"),+ ("Bottom Left Corner", "Lewy dolny narożnik"),+ ("Bottom Right Corner", "Prawy dolny narożnik"),("Stroke Type", "Rodzaj obrysu"),("Corner Shape", "Kształt narożnika"),("Clear", "Wyczyść"),diff --git a/crates/ui-egui/src/i18n/pt_br.rs b/crates/ui-egui/src/i18n/pt_br.rsindex a9bd3ab39..6205265f2 100644--- a/crates/ui-egui/src/i18n/pt_br.rs+++ b/crates/ui-egui/src/i18n/pt_br.rs@@ -31,6 +31,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Recortar"),("Copy", "Copiar"),("Paste", "Colar"),+ ("Overprint", "Superimprimir"),+ ("Top Left Corner", "Canto superior esquerdo"),+ ("Top Right Corner", "Canto superior direito"),+ ("Bottom Left Corner", "Canto inferior esquerdo"),+ ("Bottom Right Corner", "Canto inferior direito"),("Stroke Type", "Tipo de traçado"),("Corner Shape", "Forma do canto"),("Paste Vector Art", "Colar arte vetorial"),diff --git a/crates/ui-egui/src/i18n/ru.rs b/crates/ui-egui/src/i18n/ru.rsindex 5903e7c2f..e859c1448 100644--- a/crates/ui-egui/src/i18n/ru.rs+++ b/crates/ui-egui/src/i18n/ru.rs@@ -33,6 +33,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Вырезать"),("Copy", "Копировать"),("Paste", "Вставить"),+ ("Overprint", "Наложение"),+ ("Top Left Corner", "Левый верхний угол"),+ ("Top Right Corner", "Правый верхний угол"),+ ("Bottom Left Corner", "Левый нижний угол"),+ ("Bottom Right Corner", "Правый нижний угол"),("Stroke Type", "Тип обводки"),("Corner Shape", "Форма угла"),("Clear", "Очистить"),diff --git a/crates/ui-egui/src/i18n/uk.rs b/crates/ui-egui/src/i18n/uk.rsindex 59e8872fc..ea3546a65 100644--- a/crates/ui-egui/src/i18n/uk.rs+++ b/crates/ui-egui/src/i18n/uk.rs@@ -29,6 +29,11 @@ pub(super) const TABLE: &[(&str, &str)] = &[("Cut", "Вирізати"),("Copy", "Копіювати"),("Paste", "Вставити"),+ ("Overprint", "Накладання"),+ ("Top Left Corner", "Лівий верхній кут"),+ ("Top Right Corner", "Правий верхній кут"),+ ("Bottom Left Corner", "Лівий нижній кут"),+ ("Bottom Right Corner", "Правий нижній кут"),("Stroke Type", "Тип обведення"),("Corner Shape", "Форма кута"),("Paste Vector Art", "Вставити векторну графіку"),diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rsindex a90fe989e..544eca689 100644--- a/crates/ui-egui/src/icons.rs+++ b/crates/ui-egui/src/icons.rs@@ -938,6 +938,18 @@ pub fn paint(p: &Painter, r: Rect, name: &str, c: Color32) {pen.line(&[(15.0, 13.5), (17.0, 15.5), (15.0, 17.5)]);}}+ // A box with one corner marked (Top Left, Top Right, Bottom Left, Bottom Right Corner).+ "corner-tl" | "corner-tr" | "corner-bl" | "corner-br" => {+ pen.w = 1.0;+ pen.rect(4.0, 4.0, 16.0, 16.0);+ let (x, y) = match name {+ "corner-tl" => (2.5, 2.5),+ "corner-tr" => (13.5, 2.5),+ "corner-bl" => (2.5, 13.5),+ _ => (13.5, 13.5),+ };+ pen.frect(x, y, x + 4.0, y + 4.0);+ }"corner" => {pen.w = 1.0;for (x, y) in [(3.0, 3.0), (14.0, 3.0), (3.0, 14.0), (14.0, 14.0)] {diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rsindex 65e087167..7c135baf5 100644--- a/crates/ui-egui/src/panels/properties.rs+++ b/crates/ui-egui/src/panels/properties.rs@@ -753,7 +753,13 @@ fn paint_stroke_type(p: &egui::Painter, r: Rect, kind: &str, c: egui::Color32) {/// A row of a preview dropdown's list, as InDesign's: a small preview of the choice (`preview_w`/// wide), then its name. Selected rows are highlighted.-fn preview_row(ui: &mut Ui, selected: bool, label: &str, preview_w: f32, paint: impl FnOnce(&egui::Painter, Rect, egui::Color32)) -> egui::Response {+pub(crate) fn preview_row(+ ui: &mut Ui,+ selected: bool,+ label: &str,+ preview_w: f32,+ paint: impl FnOnce(&egui::Painter, Rect, egui::Color32),+) -> egui::Response {let t = Tokens::get(ui.ctx());// As wide as the preview and its name, translated (at least 130 pt for the name), and as the// popup once its widest row has set it: the rows' highlights then end together.@@ -779,7 +785,7 @@ fn preview_row(ui: &mut Ui, selected: bool, label: &str, preview_w: f32, paint:}/// A dropdown whose face is a light preview box (stroke type, corner shape).-fn preview_dropdown(ui: &mut Ui, w: f32, label: &str, paint: impl FnOnce(&egui::Painter, Rect)) -> egui::Response {+pub(crate) fn preview_dropdown(ui: &mut Ui, w: f32, label: &str, paint: impl FnOnce(&egui::Painter, Rect)) -> egui::Response {let t = Tokens::get(ui.ctx());let (r, resp) = ui.allocate_exact_size(vec2(w, FIELD_H), Sense::click());resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::ComboBox, true, label));@@ -795,7 +801,7 @@ fn preview_dropdown(ui: &mut Ui, w: f32, label: &str, paint: impl FnOnce(&egui::/// A corner shape's glyph, as InDesign draws it in its corner lists: the top edge running into the/// corner and the right edge leaving it, in a square centred in `r`.-fn paint_corner_shape(p: &egui::Painter, r: Rect, shape: CornerShape, c: egui::Color32) {+pub(crate) fn paint_corner_shape(p: &egui::Painter, r: Rect, shape: CornerShape, c: egui::Color32) {let side = (r.width() - 3.0).min(r.height() - 3.0).max(4.0);let o = pos2(r.center().x - side / 2.0, r.center().y - side / 2.0);let at = |x: f32, y: f32| pos2(o.x + x * side, o.y + y * side);diff --git a/docs/target-app-parity.md b/docs/target-app-parity.mdindex bb7c5eb80..2a776947c 100644--- a/docs/target-app-parity.md+++ b/docs/target-app-parity.md@@ -330,7 +330,7 @@ It is evidence of breadth: each item exists. It is not a claim of InDesign-level- Drop caps (`type.para {dropCapLines, dropCapChars, dropCapStyle, dropCapAlignLeft, dropCapScaleDescenders}`, Paragraph panel, Paragraph Style Options › Drop Caps and Nested Styles; IDML DropCapLines/DropCapCharacters/DropcapDetail, the drop cap style as the leading "through 1 Dropcap" nested style): the first characters (code points, as InDesign counts them, never splitting a letter from its combining marks; up to 150) are enlarged from the first line's cap height down N − 1 leadings of the text after them (up to 25 lines; grid steps on a baseline grid), the lines beside them are indented by their advance (on the right in right-to-left paragraphs), spaces right after them are set at their size without widening the indent, baselines don't move; a one-line drop cap keeps a smaller size of its own and sets its tabs at the paragraph's tab stops; Align Left Edge (on by default) moves the drop cap left by its first letter's side bearing so its ink starts at the indent; Scale for Descenders is kept but doesn't change the layout yet; a drop cap character style, and nested styles through the drop cap (Dropcap delimiter). Drawn on screen and in PDF (text in order), with caret, hit testing and selection over the enlarged letters. Vertical text sets no drop caps.- User dictionary hyphenation exceptions (`hyphenation.addException/removeException/list`, Edit ▸ Spelling ▸ User Dictionary): `ex~am~ple` breaks only at `~`, a plain word never hyphenates.- Frame Fitting Options (`object.fittingOptions`, Object ▸ Fitting ▸ Frame Fitting Options…): Auto-Fit refits on resize, fitting, Align From reference point, crop amounts; IDML FrameFittingOption.-- Paragraph borders (per-side weights, colour, tint, offsets) and shading offsets, drawn per column part of split paragraphs (also when overset); Paragraph panel controls; IDML ParagraphBorder*/ParagraphShading*Offset.+- Paragraph borders (per-side weights, colour, tint, offsets) and shading offsets, drawn per column part of split paragraphs (also when overset); Paragraph panel controls; IDML ParagraphBorder*/ParagraphShading*Offset. Overprint for the shading, the border and its gap (`shadingOverprint`, `borderOverprint`, `borderGapOverprint`; IDML ParagraphShadingOverprint, ParagraphBorderOverprint, ParagraphBorderGapOverprint) is kept; PDF export warns that it does not overprint yet, as for objects. Paragraph Style Options › Paragraph Border and Paragraph Shading are laid out as InDesign's: the page's heading, tint spinners with Overprint, corners in a two-by-two grid with shape glyph menus and the link between, spinner offsets.- Font menu laid out like InDesign's: search, a Filters row (classification: serif, slab serif, sans serif, script, monospaced, decorative, symbol, read from PANOSE, the OS/2 family class, the name, else the shape of the "l"; Show Favorites Only; Show Recently Added, fonts added in the last 30 days), the sample text (the selected text, Sample, pangrams) in three sizes, Recently Used fonts at the top (`recentFonts` preference), favourites (stars, `favoriteFonts`), and each family previewed in its own face with its format (TrueType, OpenType, variable, colour). A family of several styles shows how many and opens to list them, each previewed in its own face, and a style picked is applied as it is; Show Similar Fonts (≈) lists the families of the same class nearest by PANOSE. Western (and other-script) families come first, then Japanese, Simplified Chinese, Traditional Chinese and Korean ones, each group alphabetical and set off by a separator; the group comes from the font's own data (`meta` languages, family names in a CJK language, OS/2 code pages, else what it covers), read once (installed fonts by the font scan, without loading them). CJK families show their native names, the English name on hover; Preferences › Type › Show Font Names in English (`showFontNamesInEnglish`) shows English names throughout. Search matches either name; documents store the English name. Every family list (Character panel, Control bar, Properties, style dialogs, Find Font, Glyphs) follows this order.- Application preferences (engine `Prefs`) now persist across launches (desktop: prefs.json beside ui.json).- View ▸ Fit Selection in Window (⌥⌘=) and Find/Change ▸ Object (`find.objects`, `find.changeObjects`: by fill, stroke, weight, opacity, kind, layer, label).