From 757b4f7b8fcdfa7e7bdd0a756972985a0c73aec7 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 14:27:44 -0800 Subject: [PATCH] Print: Document Ink Options converts one chosen spot ink to process Each spot ink in the Output section's Document Ink Options list now has an icon before its name. Clicking it prints that ink as process: its art separates onto the process plates and it gets no plate of its own, while the other spot inks keep theirs. Clicking again keeps it as a spot ink. While Convert All Spot Colors to Process is on, every spot ink converts and the icons are dimmed; each ink keeps its own choice for when the option is turned off. A converted ink's Print box, frequency and angle are dimmed. file.print and print.preview take convertToProcess on an output.inks entry, and print.preview lists every document ink, converted ones included, in documentInks. --- crates/engine/src/cmd/print.rs | 4 +- crates/engine/src/tests/print.rs | 18 ++++ crates/pdf/src/print.rs | 16 +++- crates/pdf/src/print/plates.rs | 101 +++++++++++++------- crates/pdf/src/print/settings.rs | 14 ++- crates/pdf/src/tests/cmykimages.rs | 37 +++++++ crates/pdf/src/tests/print.rs | 87 +++++++++++++++++ crates/ui-egui/src/dialogs/print.rs | 62 +++++++++++- crates/ui-egui/src/dialogs/tests_print.rs | 40 ++++++++ crates/ui-egui/src/i18n/bg.tsv | 2 + crates/ui-egui/src/i18n/bs.tsv | 2 + crates/ui-egui/src/i18n/ca.tsv | 2 + crates/ui-egui/src/i18n/cs.tsv | 2 + crates/ui-egui/src/i18n/da.tsv | 2 + crates/ui-egui/src/i18n/de.tsv | 2 + crates/ui-egui/src/i18n/el.tsv | 2 + crates/ui-egui/src/i18n/es.tsv | 2 + crates/ui-egui/src/i18n/fi.tsv | 2 + crates/ui-egui/src/i18n/fr.tsv | 2 + crates/ui-egui/src/i18n/gu.tsv | 2 + crates/ui-egui/src/i18n/hi.tsv | 2 + crates/ui-egui/src/i18n/hu.tsv | 2 + crates/ui-egui/src/i18n/id.tsv | 2 + crates/ui-egui/src/i18n/it.tsv | 2 + crates/ui-egui/src/i18n/ja.tsv | 2 + crates/ui-egui/src/i18n/ka.tsv | 2 + crates/ui-egui/src/i18n/ko.tsv | 2 + crates/ui-egui/src/i18n/nl.tsv | 2 + crates/ui-egui/src/i18n/pl.tsv | 2 + crates/ui-egui/src/i18n/pt-br.tsv | 2 + crates/ui-egui/src/i18n/ru.tsv | 2 + crates/ui-egui/src/i18n/sv.tsv | 2 + crates/ui-egui/src/i18n/tr.tsv | 2 + crates/ui-egui/src/i18n/uk.tsv | 2 + crates/ui-egui/src/i18n/vi.tsv | 2 + crates/ui-egui/src/i18n/zh-hans.tsv | 2 + crates/ui-egui/src/i18n/zh-hant.tsv | 2 + crates/ui-egui/src/panels/swatches.rs | 2 +- crates/ui-egui/src/panels/swatches/tiles.rs | 3 +- docs/mcp.md | 22 ++++- docs/target-app-parity.md | 1 + 41 files changed, 407 insertions(+), 56 deletions(-) diff --git a/crates/engine/src/cmd/print.rs b/crates/engine/src/cmd/print.rs index 504a67d644..f7115965c4 100644 --- a/crates/engine/src/cmd/print.rs +++ b/crates/engine/src/cmd/print.rs @@ -23,7 +23,7 @@ pub fn specs() -> Vec { "Print Setup", [], None, - "{preset?: name ([Default] or a saved print preset, any case: print.presets.list; its settings replace the document's, as choosing it in the Print dialog does), settings?: {copies: 1 (1–999), collate: true, reverse, artboards: all|range|ignore (all the art as one page), range: \"1-3, 5\" (1-based, with artboards: range), skipBlank (leave out artboards with no art that prints), media: letter|legal|tabloid|a3|a4|a5|a6|b4|b5|b4 (jis)|b5 (jis)|b6 (jis)|japanese postcard|japanese double postcard|japanese envelope #3|japanese envelope #4|kaku #2|kaku #3|yonroku-ban|custom (a paper is named by its id or its dialog label, any case and spacing, so `B5 (JIS)` works; b4 and b5 stay the ISO 216 sizes, 250 × 353 and 176 × 250 mm, and the JIS sizes are b4 (jis) 257 × 364 mm, b5 (jis) 182 × 257 mm and b6 (jis) 128 × 182 mm), width, height (custom paper, 72–14400 pt), orientation: portrait|landscape|portraitFlipped|landscapeFlipped, autoRotate: true (turn the paper to each artboard; orientation ignored), transverse (the page a quarter turn on the paper), printLayers: visiblePrintable|visible|all (template layers never print), placement: {origin: topLeft|top|topRight|left|center|right|bottomLeft|bottom|bottomRight (the point of the printed area, the artboard with its bleed and marks, on the same point of the imageable area), x, y (pt, right and down)}, scaling: none|fit|custom|tileFull|tileImageable, scale: {width: 100, height: 100 (1–1000 % with custom and tiling), linked: true (width and height stay equal: give one and the other follows, and turning it on sets the height to the width; a different width and height without linked turn it off, and with linked: true, or linked: null over a linked scale, are an error; a saved scale without linked reads it as false)}, overlap: 0 (pt between tiles), tileRange: \"\" (1-based tiles across then down; empty: all), copiesPerSheet: false (not with tiling: as many copies of each artboard, with its bleed and marks, as fit the imageable area, across then down, not turned; the placement places the grid; an artboard that doesn't fit prints one copy per sheet, with a warning), gutter: 0 (pt between copies, 0–720), margin: 0 (pt the device can't print around the paper: the imageable area is inside it), marks: {trim, registration, colorBars, pageInfo, kind: roman|japanese, weight: 0.25, offset: 6} (as document.exportPdf, at the paper's scale; page information adds the tile and the ink), bleed: {useDocument: true (the document's bleed, document.setup), top, bottom, left, right} (pt), output: {mode: composite|separations (one gray page per ink that prints), emulsion: up|down (down mirrors), image: positive|negative, spotsToProcess, overprintBlack: false (separations: solid 100% K or 100% gray fills, strokes and characters, to within half a percent, overprint in the printed copy, gradients when every stop is (every point of a freeform one); rich, RGB, spot-linked and lighter blacks knock out; composite ignores it), inks: [{name: \"Cyan\"|…|a spot swatch, print: true, frequency (lpi, default 60), angle (screen angle, degrees counter-clockwise as PostScript setscreen takes it; default C 15, M 75, Y 0, K 45, spots 45)}]}, graphics: {autoFlatness: true, flatness: 1 (0.2–100), fonts: none|subset|complete}, color: {intent: perceptual|relativeColorimetric|saturation|absoluteColorimetric, preserveNumbers: true (CMYK colors keep their values), profile: \"\" (the printer profile, an RGB or CMYK one: composite PDF colors are converted to it with the intent, separations separate with a CMYK one; empty: as they are)}, advanced: {printAsBitmap (composite pages print as one image each, at the document's raster effects resolution, or lower for a page larger than 64 Mpx or 32,768 px a side), overprints: preserve|discard|simulate (composite output; preserve writes them to overprint (/OP), simulate prints them as Overprint Preview shows them; separations always keep them), flattenerPreset: \"\" (a flattener preset, built-in or saved: transparency is flattened before printing; empty: it prints live; PostScript defaults to medium)}, tileOrigin: {placed: false, x, y} (where the Print Tiling tool put the pages: print.tiling.set)}} store the print settings with the document, over the ones it has or the preset's (null keeps a value), as one undo step; no settings or preset → {settings} (the current ones, defaults if never set up)", + "{preset?: name ([Default] or a saved print preset, any case: print.presets.list; its settings replace the document's, as choosing it in the Print dialog does), settings?: {copies: 1 (1–999), collate: true, reverse, artboards: all|range|ignore (all the art as one page), range: \"1-3, 5\" (1-based, with artboards: range), skipBlank (leave out artboards with no art that prints), media: letter|legal|tabloid|a3|a4|a5|a6|b4|b5|b4 (jis)|b5 (jis)|b6 (jis)|japanese postcard|japanese double postcard|japanese envelope #3|japanese envelope #4|kaku #2|kaku #3|yonroku-ban|custom (a paper is named by its id or its dialog label, any case and spacing, so `B5 (JIS)` works; b4 and b5 stay the ISO 216 sizes, 250 × 353 and 176 × 250 mm, and the JIS sizes are b4 (jis) 257 × 364 mm, b5 (jis) 182 × 257 mm and b6 (jis) 128 × 182 mm), width, height (custom paper, 72–14400 pt), orientation: portrait|landscape|portraitFlipped|landscapeFlipped, autoRotate: true (turn the paper to each artboard; orientation ignored), transverse (the page a quarter turn on the paper), printLayers: visiblePrintable|visible|all (template layers never print), placement: {origin: topLeft|top|topRight|left|center|right|bottomLeft|bottom|bottomRight (the point of the printed area, the artboard with its bleed and marks, on the same point of the imageable area), x, y (pt, right and down)}, scaling: none|fit|custom|tileFull|tileImageable, scale: {width: 100, height: 100 (1–1000 % with custom and tiling), linked: true (width and height stay equal: give one and the other follows, and turning it on sets the height to the width; a different width and height without linked turn it off, and with linked: true, or linked: null over a linked scale, are an error; a saved scale without linked reads it as false)}, overlap: 0 (pt between tiles), tileRange: \"\" (1-based tiles across then down; empty: all), copiesPerSheet: false (not with tiling: as many copies of each artboard, with its bleed and marks, as fit the imageable area, across then down, not turned; the placement places the grid; an artboard that doesn't fit prints one copy per sheet, with a warning), gutter: 0 (pt between copies, 0–720), margin: 0 (pt the device can't print around the paper: the imageable area is inside it), marks: {trim, registration, colorBars, pageInfo, kind: roman|japanese, weight: 0.25, offset: 6} (as document.exportPdf, at the paper's scale; page information adds the tile and the ink), bleed: {useDocument: true (the document's bleed, document.setup), top, bottom, left, right} (pt), output: {mode: composite|separations (one gray page per ink that prints), emulsion: up|down (down mirrors), image: positive|negative, spotsToProcess, overprintBlack: false (separations: solid 100% K or 100% gray fills, strokes and characters, to within half a percent, overprint in the printed copy, gradients when every stop is (every point of a freeform one); rich, RGB, spot-linked and lighter blacks knock out; composite ignores it), inks: [{name: \"Cyan\"|…|a spot swatch, print: true, frequency (lpi, default 60), angle (screen angle, degrees counter-clockwise as PostScript setscreen takes it; default C 15, M 75, Y 0, K 45, spots 45), convertToProcess: false (a spot ink only: it prints on the process plates, with no plate of its own, and its print, frequency and angle are kept for when it prints as a spot ink again; spotsToProcess converts every spot ink whatever it says)}]}, graphics: {autoFlatness: true, flatness: 1 (0.2–100), fonts: none|subset|complete}, color: {intent: perceptual|relativeColorimetric|saturation|absoluteColorimetric, preserveNumbers: true (CMYK colors keep their values), profile: \"\" (the printer profile, an RGB or CMYK one: composite PDF colors are converted to it with the intent, separations separate with a CMYK one; empty: as they are)}, advanced: {printAsBitmap (composite pages print as one image each, at the document's raster effects resolution, or lower for a page larger than 64 Mpx or 32,768 px a side), overprints: preserve|discard|simulate (composite output; preserve writes them to overprint (/OP), simulate prints them as Overprint Preview shows them; separations always keep them), flattenerPreset: \"\" (a flattener preset, built-in or saved: transparency is flattened before printing; empty: it prints live; PostScript defaults to medium)}, tileOrigin: {placed: false, x, y} (where the Print Tiling tool put the pages: print.tiling.set)}} store the print settings with the document, over the ones it has or the preset's (null keeps a value), as one undo step; no settings or preset → {settings} (the current ones, defaults if never set up)", has_doc, setup ), @@ -32,7 +32,7 @@ pub fn specs() -> Vec { "Print Preview", [], None, - "{preset?: name (as print.setup's: its settings instead of the document's), settings?: {…settings of print.setup} (over the document's or the preset's)} → {pages (copies included), sheets: [{artboard (0-based; null with artboards ignored), tile? (1-based), ink? (separations), width, height (pt, the page), orientation, scale: [width %, height %], transform: [a, b, c, d, e, f] (document space → the page, pt, y down), area: [x0, y0, x1, y1] (the document region the page prints), trim: [x0, y0, x1, y1] (the artboard on the page; with copies per sheet, the box around every copy's), copies?: [[x0, y0, x1, y1]…] (copies per sheet: each copy's artboard on the page, across then down)}] (one copy, in order), tiles: [{artboard, columns, rows, printed: [1-based tiles], tiles: [[x0, y0, x1, y1]…] (document space)}], inks: [{name, spot, print, frequency, angle}] (separations), warnings (art larger than the imageable area, type that prints in the fallback font, type that doesn't fit its frame, options not applied yet…), settings} without printing", + "{preset?: name (as print.setup's: its settings instead of the document's), settings?: {…settings of print.setup} (over the document's or the preset's)} → {pages (copies included), sheets: [{artboard (0-based; null with artboards ignored), tile? (1-based), ink? (separations), width, height (pt, the page), orientation, scale: [width %, height %], transform: [a, b, c, d, e, f] (document space → the page, pt, y down), area: [x0, y0, x1, y1] (the document region the page prints), trim: [x0, y0, x1, y1] (the artboard on the page; with copies per sheet, the box around every copy's), copies?: [[x0, y0, x1, y1]…] (copies per sheet: each copy's artboard on the page, across then down)}] (one copy, in order), tiles: [{artboard, columns, rows, printed: [1-based tiles], tiles: [[x0, y0, x1, y1]…] (document space)}], inks: [{name, spot, print, frequency, angle}] (separations: the plates), documentInks: [{name, spot, print, frequency, angle, convertToProcess?: true (a spot ink printing as process, with no plate)}] (separations: every ink of the document), warnings (art larger than the imageable area, type that prints in the fallback font, type that doesn't fit its frame, options not applied yet…), settings} without printing", has_doc, preview ), diff --git a/crates/engine/src/tests/print.rs b/crates/engine/src/tests/print.rs index e2ea85d54f..140fb1aaa0 100644 --- a/crates/engine/src/tests/print.rs +++ b/crates/engine/src/tests/print.rs @@ -391,3 +391,21 @@ fn for_a_printer_a_landscape_page_is_written_upright() { assert_eq!(size(&spooled), [(612.0, 792.0)]); assert_eq!(v["pages"], 1); } + +#[test] +fn a_spot_ink_converted_to_process_is_saved_and_listed_without_a_plate() { + let (mut s, _) = session(); + s.execute("swatch.new", &json!({"name": "Gold", "color": {"model": "cmyk", "c": 0, "m": 0.2, "y": 0.8, "k": 0.1}, "spot": true})).unwrap(); + let ink = json!({"name": "Gold", "convertToProcess": true}); + let v = s.execute("print.setup", &json!({"settings": {"output": {"mode": "separations", "inks": [ink]}}})).unwrap(); + assert_eq!(v["settings"]["output"]["inks"], json!([{"name": "Gold", "print": true, "convertToProcess": true}])); + let doc = &s.doc().unwrap().doc; + let back = vectorcraft_format::load(&vectorcraft_format::save(doc, false)).unwrap(); + assert_eq!(back.print_setup.as_ref().map(|p| p["output"]["inks"][0]["convertToProcess"].clone()), Some(json!(true)), "kept in the file"); + let pv = s.execute("print.preview", &json!({})).unwrap(); + let names = |list: &Value| list.as_array().unwrap().iter().map(|i| i["name"].as_str().unwrap().to_string()).collect::>(); + assert_eq!(names(&pv["inks"]), ["Cyan", "Magenta", "Yellow", "Black"], "no Gold plate"); + assert_eq!(names(&pv["documentInks"]), ["Cyan", "Magenta", "Yellow", "Black", "Gold"]); + assert_eq!(pv["documentInks"][4]["convertToProcess"], json!(true)); + assert_eq!(pv["documentInks"][0].get("convertToProcess"), None, "written only when on"); +} diff --git a/crates/pdf/src/print.rs b/crates/pdf/src/print.rs index ba4fc5589f..6c619b3165 100644 --- a/crates/pdf/src/print.rs +++ b/crates/pdf/src/print.rs @@ -12,7 +12,8 @@ //! - Marks and bleed as PDF export draws them ([`crate::MarkSettings`], [`crate::BleedSettings`]), //! around the artboard on the paper, at the paper's scale. //! - Output: composite, or separations, one page per ink that prints ([`print_inks`]) in the -//! grey of its coverage (overprints honoured, spot colours as process if asked), emulsion down +//! gray of its coverage (overprints honored, every spot color or chosen ones as process if +//! asked), emulsion down //! (mirrored), negative (inverted). //! - Colour management: the printer profile composite colours are converted to (and //! separations separate with), the rendering intent, and whether CMYK colours keep their @@ -43,7 +44,7 @@ use vectorcraft_doc::overprint::{OverprintBlack, clear_overprints, darken_overpr use vectorcraft_doc::{ColorMode, Document, Node, NodeKind}; pub use layout::{MAX_COPIES_PER_SHEET, MAX_TILES, TileGrid}; -pub use plates::print_inks; +pub use plates::{document_inks, print_inks}; pub use settings::*; pub use tiling::{TilingPage, tiling}; @@ -132,6 +133,9 @@ pub struct PrintPreview { pub tiles: Vec, /// The inks of a separation (empty for composite output). pub inks: Vec, + /// Every ink of the document as a separation lists it, the spot inks printing as process + /// (which `inks` leaves out) included ([`document_inks`]); empty for composite output. + pub document_inks: Vec, /// What the job leaves out of the document or prints differently. pub warnings: Vec, /// Notes on the options: one the job doesn't apply or applies another way. They aren't @@ -148,6 +152,8 @@ struct Job<'a> { tiles: Vec, /// The inks of a separation (every one, printed or not). inks: Vec, + /// Every ink of the document, the spot inks printing as process included. + document_inks: Vec, /// The inks that print (indices into `inks`): each a plate. plates: Vec, /// One copy's pages: (layout, plate). @@ -444,8 +450,9 @@ impl<'a> Job<'a> { let (mut warnings, mut setting_notes) = (vec![], vec![]); let (layouts, tiles) = layout::layout(&doc, set, &mut warnings, &mut setting_notes)?; let separations = set.output.mode == OutputMode::Separations; - let (inks, more) = if separations { print_inks(&doc, set) } else { Default::default() }; + let (document_inks, more) = if separations { document_inks(&doc, set) } else { Default::default() }; setting_notes.extend(more); + let inks: Vec = document_inks.iter().filter(|i| !i.convert_to_process).cloned().collect(); let plates: Vec = (0..inks.len()).filter(|i| inks[*i].print).collect(); let printed: Vec> = if separations { (0..plates.len()).map(Some).collect() } else { vec![None] }; if printed.is_empty() { @@ -474,7 +481,7 @@ impl<'a> Job<'a> { if !postscript && !set.graphics.auto_flatness { setting_notes.push("a fixed flatness is not written yet: the output device flattens curves".into()); } - Ok(Self { doc, layouts, tiles, inks, plates, sheets, warnings, setting_notes }) + Ok(Self { doc, layouts, tiles, inks, document_inks, plates, sheets, warnings, setting_notes }) } /// The ink of plate `plate` (`None`: composite). @@ -526,6 +533,7 @@ pub fn preview(doc: &Document, set: &PrintSettings) -> Result (Vec, Vec) { - let out = &set.output; - // Options by ink name, the first for a name winning: looked up, not searched for each ink. - let mut options = std::collections::HashMap::new(); - for o in &out.inks { +/// The options of [`super::PrintOutput::inks`] by ink name, the first for a name winning: looked +/// up, not searched for each ink. +fn ink_options(set: &PrintSettings) -> HashMap<&str, &InkSettings> { + let mut options = HashMap::new(); + for o in &set.output.inks { options.entry(o.name.as_str()).or_insert(o); } + options +} + +/// The inks of a separation of `doc`: the process inks, then one per spot swatch (none for a spot +/// ink that prints as process, [`document_inks`]), with the options of +/// [`super::PrintOutput::inks`]; and the notes of [`document_inks`]. +pub fn print_inks(doc: &Document, set: &PrintSettings) -> (Vec, Vec) { + let (mut list, notes) = document_inks(doc, set); + list.retain(|p| !p.convert_to_process); + (list, notes) +} + +/// Every ink of `doc` as a separation lists it: the process inks, then one per spot swatch, with +/// the options of [`super::PrintOutput::inks`]. A spot ink prints as process inks +/// ([`PrintInk::convert_to_process`]) with Convert All Spot Colors to Process or its own +/// `convertToProcess`; its other options are kept for when it prints as a spot ink again. Notes: +/// one warning naming the options that name no ink, and one naming the process inks whose +/// options ask for a conversion they don't take. +pub fn document_inks(doc: &Document, set: &PrintSettings) -> (Vec, Vec) { + let out = &set.output; + let options = ink_options(set); let list: Vec = plates(doc) .into_iter() - .filter(|p| !(p.spot && out.spots_to_process)) .map(|p| { let o = options.get(p.name.as_str()).copied(); PrintInk { print: o.is_none_or(|o| o.print), frequency: o.and_then(|o| o.frequency).unwrap_or(DEFAULT_FREQUENCY), angle: o.and_then(|o| o.angle).unwrap_or_else(|| PrintInk::default_angle(&p.name)), + convert_to_process: p.spot && (out.spots_to_process || o.is_some_and(|o| o.convert_to_process)), spot: p.spot, name: p.name, } }) .collect(); + let few = |all: Vec<&str>| { + let more = all.len().saturating_sub(MAX_NAMED); + let shown = all.into_iter().take(MAX_NAMED).map(|n| format!("`{n}`")).collect::>().join(", "); + if more > 0 { format!("{shown} and {more} more") } else { shown } + }; // One warning for all the options naming no ink, each list cut short: the options and the - // inks both come from the file. + // inks both come from the file. A spot ink printing as process is still an ink of the job. let names: BTreeSet<&str> = list.iter().map(|p| p.name.as_str()).collect(); let unknown: Vec<&str> = out.inks.iter().map(|i| i.name.as_str()).filter(|n| !names.contains(n)).collect(); - let warnings = if unknown.is_empty() { - vec![] - } else { - let few = |all: Vec<&str>| { - let more = all.len().saturating_sub(MAX_NAMED); - let shown = all.into_iter().take(MAX_NAMED).map(|n| format!("`{n}`")).collect::>().join(", "); - if more > 0 { format!("{shown} and {more} more") } else { shown } - }; + let mut notes = vec![]; + if !unknown.is_empty() { let inks = few(list.iter().map(|p| p.name.as_str()).collect()); - vec![format!("there is no ink named {} to print (inks: {inks})", few(unknown))] - }; - (list, warnings) + notes.push(format!("there is no ink named {} to print (inks: {inks})", few(unknown))); + } + let process: Vec<&str> = + list.iter().filter(|p| !p.spot && options.get(p.name.as_str()).is_some_and(|o| o.convert_to_process)).map(|p| p.name.as_str()).collect(); + if !process.is_empty() { + notes.push(format!("{} print as process inks already: only spot inks convert to process", few(process))); + } + (list, notes) } /// The most names a warning of [`print_inks`] lists. @@ -78,20 +100,30 @@ pub(crate) struct Separator<'a> { pub doc: &'a Document, cms: Arc, set: &'a PrintSettings, + /// The inks whose own options convert them to process ([`InkSettings::convert_to_process`]). + converted: HashSet<&'a str>, /// The plates are written as PostScript, which has no blending modes. postscript: bool, } impl<'a> Separator<'a> { pub fn new(doc: &'a Document, set: &'a PrintSettings, postscript: bool) -> Self { - Self { doc, cms: separation_cms(doc, set), set, postscript } + let converted = ink_options(set).into_iter().filter(|(_, o)| o.convert_to_process).map(|(name, _)| name).collect(); + Self { doc, cms: separation_cms(doc, set), set, converted, postscript } + } + + /// Whether colors linked to swatch `name` print as process inks: every swatch but + /// Registration with Convert All Spot Colors to Process, else the inks converted one by one. + /// A link to a process swatch separates as its color either way. + fn converts(&self, name: &str) -> bool { + name != REGISTRATION && (self.set.output.spots_to_process || self.converted.contains(name)) } /// How much of ink `plate` colour `c` (with swatch link `link`) prints, 0..1. fn ink(&self, plate: &str, c: &Color, link: Link) -> f32 { let color = &self.set.color; - // Spot colours as process: only Registration keeps its link. - let link = link.filter(|(name, _)| !self.set.output.spots_to_process || *name == REGISTRATION); + // Spot colors as process lose their link; Registration always keeps its. + let link = link.filter(|(name, _)| !self.converts(name)); // Without Preserve Numbers, CMYK colours are separated again from their appearance. let lab; let c = if !color.preserve_numbers && matches!(c, Color::Cmyk { .. }) { @@ -104,15 +136,16 @@ impl<'a> Separator<'a> { } /// [`Self::ink`] of a colour that prints process plates `plates` with its spot tint - /// ([`stop_inks`]): the spot plate prints the tint and the process plates print `plates`. With - /// spots as process, each process plate prints `plates` layered with the spot tint's process - /// equivalent, as a separated image's plates layer ([`vectorcraft_doc::separated::Separated::coverage_as`]). + /// ([`stop_inks`]): the spot plate prints the tint and the process plates print `plates`. When + /// its spot ink prints as process, each process plate prints `plates` layered with the spot + /// tint's process equivalent, as a separated image's plates layer + /// ([`vectorcraft_doc::separated::Separated::coverage_as`]). fn stop_ink(&self, plate: &str, c: &Color, link: Link, plates: StopPlates) -> f32 { let own = stop_inks(self.doc, &self.cms, c, link, plates, self.set.color.intent); let (Some(_), Some((name, tint))) = (plates, own.spot.as_ref()) else { return self.ink(plate, c, link); }; - if !self.set.output.spots_to_process { + if !self.converts(name) { return own.on_plate(plate); } let Some(i) = cms::PROCESS_PLATES.iter().position(|p| *p == plate) else { @@ -207,12 +240,8 @@ impl<'a> Separator<'a> { } } // A DCS file's image prints its own plates: a spot plate on its ink when the job prints - // that ink, else as its process equivalent. - let spots: BTreeSet = if self.set.output.spots_to_process { - BTreeSet::new() - } else { - plates(self.doc).into_iter().filter(|p| p.spot).map(|p| p.name).collect() - }; + // that ink as a spot ink, else as its process equivalent. + let spots: BTreeSet = plates(self.doc).into_iter().filter(|p| p.spot && !self.converts(&p.name)).map(|p| p.name).collect(); let own = |name: &str| spots.contains(name); // A spot plate printing as process prints as the document's swatch of its ink does, when // there is one; else as the process equivalent its file gives. diff --git a/crates/pdf/src/print/settings.rs b/crates/pdf/src/print/settings.rs index 15e029a13a..f6f3e5c563 100644 --- a/crates/pdf/src/print/settings.rs +++ b/crates/pdf/src/print/settings.rs @@ -462,15 +462,21 @@ pub struct InkSettings { /// Halftone screen angle (degrees); `None`: the ink's default. #[serde(skip_serializing_if = "Option::is_none")] pub angle: Option, + /// A spot ink prints as process inks: no plate of its own, its color on the process plates. + /// Off by default. [`PrintOutput::spots_to_process`] converts every spot ink whatever this + /// says; process inks and Registration ignore it. + #[serde(skip_serializing_if = "std::ops::Not::not")] + pub convert_to_process: bool, } impl Default for InkSettings { fn default() -> Self { - Self { name: String::new(), print: true, frequency: None, angle: None } + Self { name: String::new(), print: true, frequency: None, angle: None, convert_to_process: false } } } -/// An ink of a separation, with its options resolved ([`super::inks`]). +/// An ink of a separation, with its options resolved ([`super::print_inks`], +/// [`super::document_inks`]). #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct PrintInk { @@ -479,6 +485,10 @@ pub struct PrintInk { pub print: bool, pub frequency: f64, pub angle: f64, + /// A spot ink printing as process inks (its own option or Convert All Spot Colors to + /// Process): it has no plate. + #[serde(skip_serializing_if = "std::ops::Not::not")] + pub convert_to_process: bool, } /// The default halftone screen ruling (lpi). diff --git a/crates/pdf/src/tests/cmykimages.rs b/crates/pdf/src/tests/cmykimages.rs index deb98b1fea..4d22a10ee6 100644 --- a/crates/pdf/src/tests/cmykimages.rs +++ b/crates/pdf/src/tests/cmykimages.rs @@ -423,6 +423,43 @@ fn a_dcs_spot_plate_printing_as_process_takes_the_documents_swatch() { assert_eq!(get(&own, "Yellow"), Some(vec![0, 0])); } +/// A DCS image's spot plate converted to process on its own prints as the document's swatch of +/// its ink, while its other spot plate keeps printing on its ink. +#[test] +fn a_dcs_image_converts_only_the_spot_ink_chosen() { + use vectorcraft_doc::separated::{InkPlate, Separated}; + let plate = |name: &str, cmyk: [f32; 4], data: [u8; 2]| InkPlate { name: name.into(), cmyk, data: data.to_vec() }; + let s = Separated::new( + 2, + 1, + vec![ + plate("Cyan", [0.0; 4], [0, 0]), + plate("Spot Orange", [0.0, 0.6, 1.0, 0.0], [128, 0]), + plate("Spot Green", [0.0, 0.0, 1.0, 0.0], [0, 128]), + ], + ) + .unwrap(); + let mut d = image_doc(ImageBlob::separated_tiff(&s, None, &[]).unwrap(), 2, 1); + d.swatches.push(Swatch { name: "Spot Orange".into(), paint: Paint::solid(Color::cmyk(0.0, 0.6, 1.0, 0.0)), global: true, spot: true }); + // The document's Spot Green is cyan, where its file says yellow. + d.swatches.push(Swatch { name: "Spot Green".into(), paint: Paint::solid(Color::cmyk(1.0, 0.0, 0.0, 0.0)), global: true, spot: true }); + let settings: PrintSettings = + serde_json::from_value(json!({"output": {"mode": "separations", "inks": [{"name": "Spot Green", "convertToProcess": true}]}})).unwrap(); + let names: Vec = print_inks(&d, &settings).0.into_iter().map(|i| i.name).collect(); + assert_eq!(names, ["Cyan", "Magenta", "Yellow", "Black", "Spot Orange"]); + let job = plan(&d, &PrintOptions { settings, ..Default::default() }).unwrap(); + let coverage = job.plates.iter().map(|p| { + let NodeKind::Image(im) = &p.layers[0].children().unwrap()[0].kind else { panic!("an image") }; + p.image_blob(im).and_then(|b| b.coverage()).unwrap().2 + }); + let all: Vec<(String, Vec)> = names.into_iter().zip(coverage).collect(); + let get = |name: &str| all.iter().find(|(n, _)| n == name).map(|(_, c)| c.clone()); + assert_eq!(get("Cyan"), Some(vec![0, 128]), "the swatch's cyan"); + assert_eq!(get("Yellow"), Some(vec![0, 0]), "not the file's yellow"); + assert_eq!(get("Magenta"), Some(vec![0, 0]), "Spot Orange stays on its own plate"); + assert_eq!(get("Spot Orange"), Some(vec![128, 0])); +} + #[test] fn the_output_settings_convert_cmyk_images_and_compression_recompresses_them_in_cmyk() { let ink = [0u8, 102, 255, 0]; diff --git a/crates/pdf/src/tests/print.rs b/crates/pdf/src/tests/print.rs index 2ae14a8d55..9403d694b4 100644 --- a/crates/pdf/src/tests/print.rs +++ b/crates/pdf/src/tests/print.rs @@ -637,6 +637,91 @@ fn cmyk_and_a_spot_separate_into_five_plates() { assert_eq!(inks(&p[2]), [0.0, 40.0], "the gold's yellow"); } +/// A CMYK document with spot swatches Gold and Pine, and three 50 pt squares left to right: Gold +/// at 50%, Pine at 100% and Registration. +fn gold_and_pine() -> Document { + let mut d = doc(200.0, 100.0, &[]); + d.color_mode = vectorcraft_doc::ColorMode::Cmyk; + d.swatches.push(Swatch { name: "Gold".into(), paint: Paint::solid(Color::cmyk(0.0, 0.2, 0.8, 0.1)), global: true, spot: true }); + d.swatches.push(Swatch { name: "Pine".into(), paint: Paint::solid(Color::cmyk(0.8, 0.0, 0.3, 0.0)), global: true, spot: true }); + let layer = d.default_layer().unwrap(); + let linked = |color: Color, swatch: &str, tint: f32| Paint::Solid { color, swatch: Some(swatch.into()), tint }; + let squares = [ + (0.0, linked(Color::cmyk(0.0, 0.1, 0.4, 0.05), "Gold", 0.5)), + (60.0, linked(Color::cmyk(0.8, 0.0, 0.3, 0.0), "Pine", 1.0)), + (120.0, linked(Color::cmyk(1.0, 1.0, 1.0, 1.0), vectorcraft_color::swatch::REGISTRATION, 1.0)), + ]; + for (x, p) in squares { + let id = d.alloc_id(); + d.insert(Some(layer), 0, Node::path(id, shapes::rectangle(Rect::new(x, 0.0, x + 50.0, 50.0)), Appearance::basic(p, Paint::None, 0.0))) + .unwrap(); + } + d +} + +/// The ink of each 50 pt square on a plate, left to right, in percent. +fn square_inks(page: &Page) -> Vec { + page.1 + .iter() + .filter(|(b, _)| (b.width() - 50.0).abs() < 1.0 && (b.height() - 50.0).abs() < 1.0) + .map(|(_, p)| match p.color() { + Some(Color::Gray { k }) => (k * 100.0).round(), + c => panic!("{c:?}"), + }) + .collect() +} + +#[test] +fn one_spot_ink_converts_to_process_and_the_others_keep_their_plates() { + let d = gold_and_pine(); + // Gold prints as process even with its plate turned off: converting is not leaving it out. + let set = json!({"output": {"mode": "separations", "inks": [{"name": "Gold", "convertToProcess": true, "print": false, "frequency": 100}]}}); + let pv = preview(&d, &settings(set.clone())).unwrap(); + assert_eq!(pv.inks.iter().map(|i| i.name.as_str()).collect::>(), ["Cyan", "Magenta", "Yellow", "Black", "Pine"]); + let all: Vec<(&str, bool)> = pv.document_inks.iter().map(|i| (i.name.as_str(), i.convert_to_process)).collect(); + assert_eq!(all, [("Cyan", false), ("Magenta", false), ("Yellow", false), ("Black", false), ("Gold", true), ("Pine", false)]); + let gold = &pv.document_inks[4]; + assert_eq!((gold.print, gold.frequency), (false, 100.0), "its plate options are kept"); + assert!(pv.setting_notes.iter().all(|n| !n.contains("no ink named") && !n.contains("only spot inks")), "{:?}", pv.setting_notes); + let p = pages(&job(&d, set).bytes); + assert_eq!(p.len(), 5); + // (Gold, Pine, Registration) on Cyan, Magenta, Yellow, Black and Pine. + assert_eq!( + p.iter().map(square_inks).collect::>(), + [[0.0, 0.0, 100.0], [10.0, 0.0, 100.0], [40.0, 0.0, 100.0], [5.0, 0.0, 100.0], [0.0, 100.0, 100.0]] + ); +} + +#[test] +fn converting_every_spot_ink_overrides_and_keeps_each_inks_own_choice() { + let d = gold_and_pine(); + let inks = json!([{"name": "Gold", "convertToProcess": false, "angle": 30}, {"name": "Pine", "convertToProcess": true}]); + let pv = preview(&d, &settings(json!({"output": {"mode": "separations", "spotsToProcess": true, "inks": inks}}))).unwrap(); + assert_eq!(pv.inks.iter().map(|i| i.name.as_str()).collect::>(), ["Cyan", "Magenta", "Yellow", "Black"]); + let spots: Vec<(&str, bool, f64)> = pv.document_inks[4..].iter().map(|i| (i.name.as_str(), i.convert_to_process, i.angle)).collect(); + assert_eq!(spots, [("Gold", true, 30.0), ("Pine", true, 45.0)]); + // The options of the converted inks still name inks of the document. + assert!(pv.setting_notes.iter().all(|n| !n.contains("no ink named")), "{:?}", pv.setting_notes); + // Without the option, each ink's own choice applies again. + let pv = preview(&d, &settings(json!({"output": {"mode": "separations", "inks": inks}}))).unwrap(); + assert_eq!(pv.inks.iter().map(|i| i.name.as_str()).collect::>(), ["Cyan", "Magenta", "Yellow", "Black", "Gold"]); + // A process ink doesn't convert: it keeps its plate, and a note says so. + let pv = preview(&d, &settings(json!({"output": {"mode": "separations", "inks": [{"name": "Cyan", "convertToProcess": true}]}}))).unwrap(); + assert_eq!(pv.inks.len(), 6); + assert!(pv.document_inks.iter().all(|i| !i.convert_to_process)); + assert_eq!(pv.setting_notes, ["`Cyan` print as process inks already: only spot inks convert to process"]); +} + +#[test] +fn an_ink_option_without_convert_to_process_keeps_its_spot_plate() { + let set = settings(json!({"output": {"inks": [{"name": "Gold", "angle": 30}]}})); + assert!(!set.output.inks[0].convert_to_process); + let back = serde_json::to_value(&set.output.inks[0]).unwrap(); + assert_eq!(back, json!({"name": "Gold", "print": true, "angle": 30.0}), "off is not written"); + let on = InkSettings { convert_to_process: true, ..set.output.inks[0].clone() }; + assert_eq!(serde_json::to_value(&on).unwrap()["convertToProcess"], json!(true)); +} + /// A 200 × 100 pt CMYK document filled with cyan, with spot swatch `Ink` (100% K) and the objects /// `art` over the cyan. fn over_cyan(art: Vec) -> Document { @@ -915,6 +1000,8 @@ fn a_spot_gradient_stop_prints_its_process_plates() { assert_eq!(first(json!({"output": {"mode": "separations"}})), [25.0, 0.0, 40.0, 0.0, 50.0], "Cyan, Magenta, Yellow, Black, Gold"); // Spots as process: the plates layered with the gold tint's process inks (0, 10, 40, 5). assert_eq!(first(json!({"output": {"mode": "separations", "spotsToProcess": true}})), [25.0, 10.0, 64.0, 5.0]); + // Gold converted on its own: the same. + assert_eq!(first(json!({"output": {"mode": "separations", "inks": [{"name": "Gold", "convertToProcess": true}]}})), [25.0, 10.0, 64.0, 5.0]); } #[test] diff --git a/crates/ui-egui/src/dialogs/print.rs b/crates/ui-egui/src/dialogs/print.rs index 017e669d9c..369a953780 100644 --- a/crates/ui-egui/src/dialogs/print.rs +++ b/crates/ui-egui/src/dialogs/print.rs @@ -779,11 +779,13 @@ fn output(ui: &mut egui::Ui, d: &mut Dialog, pv: &Result) { flag(ui, d, "output.spotsToProcess", tl!("Convert All Spot Colors to Process"), separations); flag(ui, d, "output.overprintBlack", tl!("Overprint Black"), separations); heading(ui, tl!("Document Ink Options")); - let inks = pv.as_ref().ok().and_then(|v| v["inks"].as_array()).map(Vec::as_slice).unwrap_or_default(); + // Every ink of the document, the spot inks printing as process (no plate) included. + let inks = pv.as_ref().ok().and_then(|v| v["documentInks"].as_array()).map(Vec::as_slice).unwrap_or_default(); if !separations || inks.is_empty() { note(ui, tl!("Separations list the document's inks here: one page per ink that prints.")); return; } + let all_spots = get(d, "output.spotsToProcess").as_bool() == Some(true); let t = Tokens::get(ui.ctx()); egui::Grid::new("print-inks").num_columns(4).spacing([12.0, 4.0]).show(ui, |ui| { for h in [tl!("Print"), tl!("Ink"), tl!("Frequency"), tl!("Angle")] { @@ -792,17 +794,31 @@ fn output(ui: &mut egui::Ui, d: &mut Dialog, pv: &Result) { ui.end_row(); for ink in inks { let name = ink["name"].as_str().unwrap_or_default(); + // A spot ink printing as process has no plate: its plate options wait, dimmed, for it + // to print as a spot ink again. + let process = ink["convertToProcess"] == true; let on = ink["print"].as_bool().unwrap_or(true); - if widgets::check_box(ui, name, on, true) { + if widgets::check_box(ui, name, on, !process) { set_ink(d, name, "print", json!(!on)); } - let spot = if ink["spot"] == true { format!(" ({})", tl!("spot")) } else { String::new() }; - ui.label(egui::RichText::new(format!("{name}{spot}")).color(t.text)); + ui.horizontal(|ui| { + if ink["spot"] == true { + if ink_kind_button(ui, name, process, !all_spots) { + set_ink(d, name, "convertToProcess", json!(!process)); + } + } else { + ui.add_space(INK_KIND); + } + let spot = if ink["spot"] == true { format!(" ({})", tl!("spot")) } else { String::new() }; + ui.label(egui::RichText::new(format!("{name}{spot}")).color(t.text)); + }); for (k, suffix) in [("frequency", " lpi"), ("angle", "°")] { let v = ink[k].as_f64().unwrap_or(0.0); let heading = if k == "frequency" { tl!("Frequency") } else { tl!("Angle") }; let field_name = format!("{heading} {name}"); - if let Some(x) = widgets::plain_field_named(ui, ("print-ink", name, k), Some(&field_name), v, suffix, 2, 72.0) { + let typed = + ui.add_enabled_ui(!process, |ui| widgets::plain_field_named(ui, ("print-ink", name, k), Some(&field_name), v, suffix, 2, 72.0)); + if let Some(x) = typed.inner { set_ink(d, name, k, json!(x)); } } @@ -812,6 +828,42 @@ fn output(ui: &mut egui::Ui, d: &mut Dialog, pv: &Result) { note(ui, tl!("Frequencies and angles are the output device's to apply.")); } +/// The size of the spot or process icon before a spot ink's name. +const INK_KIND: f32 = 18.0; + +/// The icon before spot ink `name`'s name: a spot icon while it prints as a spot ink, the four +/// process inks while it prints as process (`process`). A click switches it; dimmed (`enabled` +/// off) while Convert All Spot Colors to Process converts every spot ink. Whether it was clicked. +fn ink_kind_button(ui: &mut egui::Ui, name: &str, process: bool, enabled: bool) -> bool { + let label = if process { + crate::i18n::fmt(tl!("Keep {name} as spot"), &[("name", name)]) + } else { + crate::i18n::fmt(tl!("Convert {name} to process"), &[("name", name)]) + }; + let sense = if enabled { egui::Sense::click() } else { egui::Sense::hover() }; + let (rect, resp) = ui.allocate_exact_size(egui::Vec2::splat(INK_KIND), sense); + let t = Tokens::get(ui.ctx()); + if enabled && resp.hovered() { + ui.painter().rect_filled(rect, 3.0, t.hover); + } + let icon = rect.shrink(4.0); + if process { + let q = icon.size() / 2.0; + for (i, c) in crate::panels::swatches::CMYK_INKS.into_iter().enumerate() { + let c = if enabled { c } else { c.gamma_multiply(0.4) }; + let at = icon.min + egui::vec2((i % 2) as f32 * q.x, (i / 2) as f32 * q.y); + ui.painter().rect_filled(egui::Rect::from_min_size(at, q), 0.0, c); + } + } else { + let color = if enabled { t.icon } else { t.text_disabled }; + ui.painter().circle_stroke(icon.center(), icon.width() / 2.0, egui::Stroke::new(1.0, color)); + ui.painter().circle_filled(icon.center(), icon.width() / 5.0, color); + } + resp.widget_info(|| widgets::icon_button_info(enabled, false, &label)); + let resp = resp.on_hover_text(label); + enabled && resp.clicked() +} + /// Set option `key` of ink `name` in `output.inks` (the ink gets its own entry the first time). fn set_ink(d: &mut Dialog, name: &str, key: &str, value: Value) { let mut inks = get(d, "output.inks").as_array().cloned().unwrap_or_default(); diff --git a/crates/ui-egui/src/dialogs/tests_print.rs b/crates/ui-egui/src/dialogs/tests_print.rs index f1baabc1b9..9153471ebd 100644 --- a/crates/ui-egui/src/dialogs/tests_print.rs +++ b/crates/ui-egui/src/dialogs/tests_print.rs @@ -440,3 +440,43 @@ fn the_dimmed_scale_link_ignores_the_keyboard() { screen.run(&mut app, vec![]); assert_eq!(scale(&mut app), (100.0, 100.0, true)); } + +/// The node screen readers call `label` with role `role`, and whether it is dimmed. +fn node(screen: &mut Screen, app: &mut VectorcraftApp, label: &str, role: egui::accesskit::Role) -> Option<(egui::accesskit::NodeId, bool)> { + screen.run(app, vec![]); + let out = screen.run(app, vec![]); + let nodes = &out.platform_output.accesskit_update.as_ref().expect("an accessibility tree").nodes; + nodes.iter().find(|(_, n)| n.label() == Some(label) && n.role() == role).map(|(id, n)| (*id, n.is_disabled())) +} + +#[test] +fn a_spot_inks_icon_converts_it_to_process_and_back() { + use egui::accesskit::{Action, ActionRequest, Role, TreeId}; + let (mut app, _) = app(); + app.run("swatch.new", json!({"name": "Gold", "color": {"model": "cmyk", "c": 0, "m": 0.2, "y": 0.8, "k": 0.1}, "spot": true})).unwrap(); + app.run("file.print", json!({})).unwrap(); + set(&mut app, "__section", json!("Output")); + set(&mut app, "output", json!({"mode": "separations"})); + let mut screen = Screen::new(); + let click = |target_node| { + egui::Event::AccessKitActionRequest(ActionRequest { action: Action::Click, target_node, target_tree: TreeId::ROOT, data: None }) + }; + // Only the spot ink has the icon. + assert!(node(&mut screen, &mut app, "Convert Cyan to process", Role::Button).is_none()); + let (convert, dimmed) = node(&mut screen, &mut app, "Convert Gold to process", Role::Button).expect("Gold's icon"); + assert!(!dimmed); + assert_eq!(node(&mut screen, &mut app, "Gold", Role::CheckBox).map(|n| n.1), Some(false)); + screen.run(&mut app, vec![click(convert)]); + assert_eq!(dialog(&mut app).fields["output"]["inks"], json!([{"name": "Gold", "print": true, "convertToProcess": true}])); + // Converted, it has no plate: its Print box is dimmed, and the icon turns it back. + assert_eq!(node(&mut screen, &mut app, "Gold", Role::CheckBox).map(|n| n.1), Some(true)); + let (keep, _) = node(&mut screen, &mut app, "Keep Gold as spot", Role::Button).expect("the process icon"); + screen.run(&mut app, vec![click(keep)]); + assert_eq!(dialog(&mut app).fields["output"]["inks"], json!([{"name": "Gold", "print": true, "convertToProcess": false}])); + // Convert All Spot Colors to Process converts it and dims the icon, keeping its own choice. + dialog(&mut app).fields["output"]["spotsToProcess"] = json!(true); + let (keep, dimmed) = node(&mut screen, &mut app, "Keep Gold as spot", Role::Button).expect("the process icon"); + assert!(dimmed); + screen.run(&mut app, vec![click(keep)]); + assert_eq!(dialog(&mut app).fields["output"]["inks"], json!([{"name": "Gold", "print": true, "convertToProcess": false}])); +} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 754ae856bd..994507ab00 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -602,6 +602,8 @@ font-technology Variable Променливи Control Контрол Convert Конвертиране Convert All Spot Colors to Process Конвертиране на всички спот цветове в трихромни + Convert {name} to process Конвертиране на {name} в трихромен + Keep {name} as spot Запазване на {name} като спот Convert All Strokes to Outlines Конвертиране на всички щрихове в контури Convert All Text to Outlines Конвертиране на целия текст в контури Convert Anchor Point Преобразуване на опорна точка diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 139ebee91b..fc2fc567fc 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -2839,6 +2839,8 @@ digits Malayalam Malajalam Collate Složi po kopijama Composite colours are converted to it; separations separate with it when it is a CMYK profile. Kompozitne boje se pretvaraju u njega; separacije se razdvajaju njime kad je CMYK profil. Convert All Spot Colors to Process Pretvori sve spot boje u procesne + Convert {name} to process Pretvori {name} u procesnu + Keep {name} as spot Zadrži {name} kao spot Overprint Black Pretisak crne Default Printer Zadani štampač Document Ink Options Opcije tinti dokumenta diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 2f823c2db0..6b678addf5 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -896,6 +896,8 @@ antiAlias Sharp Nítid Conté Crayon… Llapis Conté… Convert Converteix Convert All Spot Colors to Process Converteix tots els colors directes a quadricromia + Convert {name} to process Converteix {name} a quadricromia + Keep {name} as spot Mantén {name} com a color directe Convert All Strokes to Outlines Converteix tots els traços en contorns Convert All Text to Outlines Converteix tot el text en contorns Convert Anchor Point Converteix el punt d’ancoratge diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 99a475d96d..3891438ad1 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -2923,6 +2923,8 @@ digits Malayalam Malajálamské Collate Kompletovat Composite colours are converted to it; separations separate with it when it is a CMYK profile. Kompozitní barvy se na něj převádějí; separace podle něj separují, pokud je to profil CMYK. Convert All Spot Colors to Process Převést všechny přímé barvy na procesní + Convert {name} to process Převést {name} na procesní + Keep {name} as spot Ponechat {name} jako přímou barvu Default Printer Výchozí tiskárna Document Ink Options Možnosti inkoustů dokumentu Download: Stahování: diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 85aed446b2..f42ff993d5 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -5390,6 +5390,8 @@ digits Malayalam Malayalam Collate Sortér Composite colours are converted to it; separations separate with it when it is a CMYK profile. Kompositfarver konverteres til den; separationer separeres med den, når det er en CMYK-profil. Convert All Spot Colors to Process Konvertér alle spotfarver til procesfarver + Convert {name} to process Konvertér {name} til procesfarve + Keep {name} as spot Behold {name} som spotfarve Default Printer Standardprinter Document Ink Options Indstillinger for dokumentblæk Download: Download: diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 091114c55d..1a5ae18319 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -595,6 +595,8 @@ font-technology Variable Variabel Control Steuerung Convert Konvertieren Convert All Spot Colors to Process Alle Volltonfarben in Prozessfarben konvertieren + Convert {name} to process {name} in Prozessfarbe konvertieren + Keep {name} as spot {name} als Volltonfarbe beibehalten Convert All Strokes to Outlines Alle Konturen in Pfade umwandeln Convert All Text to Outlines Gesamten Text in Pfade umwandeln Convert Anchor Point Ankerpunkt umwandeln diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 560c5a91e3..7938f1712f 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -576,6 +576,8 @@ font-technology Variable Μεταβλητές Control Έλεγχος Convert Μετατροπή Convert All Spot Colors to Process Μετατροπή όλων των πλακάτων χρωμάτων σε χρώματα τετραχρωμίας + Convert {name} to process Μετατροπή του {name} σε χρώμα τετραχρωμίας + Keep {name} as spot Διατήρηση του {name} ως πλακάτου χρώματος Convert All Strokes to Outlines Μετατροπή όλων των περιγραμμάτων σε διαδρομές Convert All Text to Outlines Μετατροπή όλου του κειμένου σε περιγράμματα Convert Anchor Point Μετατροπή σημείου αγκύρωσης diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index ed20179e82..16a599670c 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -617,6 +617,8 @@ font-technology Variable Variables Control Control Convert Convertir Convert All Spot Colors to Process Convertir todas las tintas planas en cuatricromía + Convert {name} to process Convertir {name} en cuatricromía + Keep {name} as spot Mantener {name} como tinta plana Convert All Strokes to Outlines Convertir todos los trazos en contornos Convert All Text to Outlines Convertir todo el texto en contornos Convert Anchor Point Convertir punto de ancla diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index f0b4039c83..c5d991b53f 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -2867,6 +2867,8 @@ digits Malayalam Malajalam Collate Lajittele Composite colours are converted to it; separations separate with it when it is a CMYK profile. Yhdistelmävärit muunnetaan siihen; erottelut tehdään sen mukaan, kun se on CMYK-profiili. Convert All Spot Colors to Process Muunna kaikki spottivärit prosessiväreiksi + Convert {name} to process Muunna {name} prosessiväriksi + Keep {name} as spot Säilytä {name} spottivärinä Default Printer Oletustulostin Document Ink Options Asiakirjan musteasetukset Download: Lataus: diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 06a686c9ce..d12bc194fd 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -618,6 +618,8 @@ font-technology Variable Variables Control Contrôle Convert Convertir Convert All Spot Colors to Process Convertir tous les tons directs en couleurs quadrichromiques + Convert {name} to process Convertir {name} en couleur quadrichromique + Keep {name} as spot Conserver {name} en ton direct Convert All Strokes to Outlines Vectoriser tous les contours Convert All Text to Outlines Vectoriser tout le texte Convert Anchor Point Convertir le point d’ancrage diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 9bd0977cb5..be3ae6fc62 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -717,6 +717,8 @@ Conté Crayon… કોન્ટે ક્રેયોન… Convert રૂપાંતર કરો Convert All Spot Colors to Process બધા સ્પોટ રંગોને પ્રોસેસમાં રૂપાંતર કરો + Convert {name} to process {name} ને પ્રોસેસમાં રૂપાંતર કરો + Keep {name} as spot {name} ને સ્પોટ તરીકે રાખો Convert All Strokes to Outlines બધા સ્ટ્રોકને આઉટલાઇનમાં રૂપાંતર કરો Convert All Text to Outlines બધા ટેક્સ્ટને આઉટલાઇનમાં રૂપાંતર કરો Convert Anchor Point એન્કર પોઇન્ટ રૂપાંતર કરો diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index b977422495..52ea0276ba 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -1033,6 +1033,8 @@ antiAlias Sharp शार्प Control नियंत्रण Convert कन्वर्ट करें Convert All Spot Colors to Process सभी स्पॉट कलर्स को प्रोसेस में कनवर्ट करें + Convert {name} to process {name} को प्रोसेस में कनवर्ट करें + Keep {name} as spot {name} को स्पॉट के रूप में रखें Convert All Strokes to Outlines सभी स्ट्रोक को आउटलाइन में कनवर्ट करें Convert All Text to Outlines सभी टेक्स्ट को आउटलाइन में कनवर्ट करें Convert Anchor Point एंकर पॉइंट कनवर्ट करें diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 42a4a81a6b..226e6beff0 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -810,6 +810,8 @@ font-technology Variable Változó Control Vezérlősáv Convert Átalakítás Convert All Spot Colors to Process Minden direktszín átalakítása skálaszínné + Convert {name} to process {name} átalakítása skálaszínné + Keep {name} as spot {name} megtartása direktszínként Convert All Strokes to Outlines Minden körvonal útvonallá alakítása Convert All Text to Outlines Minden szöveg útvonallá alakítása Convert Anchor Point Horgonypont átalakítása diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index ebd1697020..fe0013505f 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -2648,6 +2648,8 @@ digits Malayalam Malayalam Collate Susun Composite colours are converted to it; separations separate with it when it is a CMYK profile. Warna komposit dikonversi ke profil ini; separasi memisah dengannya bila merupakan profil CMYK. Convert All Spot Colors to Process Konversi semua warna spot menjadi proses + Convert {name} to process Konversi {name} menjadi proses + Keep {name} as spot Pertahankan {name} sebagai spot Default Printer Printer default Document Ink Options Opsi tinta dokumen Download: Unduh: diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 147e5bfe35..a87cef49df 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -617,6 +617,8 @@ font-technology Variable Variabili Control Controllo Convert Converti Convert All Spot Colors to Process Converti tutti i colori spot in quadricromia + Convert {name} to process Converti {name} in quadricromia + Keep {name} as spot Mantieni {name} come colore spot Convert All Strokes to Outlines Converti tutte le tracce in contorni Convert All Text to Outlines Converti tutto il testo in contorni Convert Anchor Point Converti punto di ancoraggio diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 6db09e8cfe..0214929e26 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1373,6 +1373,8 @@ antiAlias Sharp シャープ Contextual Alternates 前後関係に依存する字形 Convert 変換 Convert All Spot Colors to Process すべての特色をプロセスカラーに変換 + Convert {name} to process {name} をプロセスカラーに変換 + Keep {name} as spot {name} を特色のままにする Convert All Strokes to Outlines すべての線をアウトラインに変換 Convert All Text to Outlines すべてのテキストをアウトラインに変換 Convert Anchor Point アンカーポイントの切り替え diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 858cb6f296..b0b29d0c56 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -4704,6 +4704,8 @@ digits Malayalam მალაიალამური Collate დაკომპლექტება Composite colours are converted to it; separations separate with it when it is a CMYK profile. შედგენილი ფერები მასში გარდაიქმნება; სეპარაცია მისით ხდება, როცა ის CMYK პროფილია. Convert All Spot Colors to Process ყველა სპოტ-ფერის პროცესულად გარდაქმნა + Convert {name} to process {name}-ის პროცესულად გარდაქმნა + Keep {name} as spot {name}-ის სპოტ-ფერად დატოვება Default Printer ნაგულისხმევი პრინტერი Document Ink Options დოკუმენტის საღებავების პარამეტრები Download: ჩამოტვირთვა: diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index fa8686588f..f5b07261f8 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1363,6 +1363,8 @@ antiAlias Sharp 날카롭게 Contextual Alternates 문맥 대체 글자 Convert 변환 Convert All Spot Colors to Process 모든 별색을 프로세스 색상으로 변환 + Convert {name} to process {name}을(를) 프로세스 색상으로 변환 + Keep {name} as spot {name}을(를) 별색으로 유지 Convert All Strokes to Outlines 모든 선을 윤곽선으로 변환 Convert All Text to Outlines 모든 문자를 윤곽선으로 변환 Convert Anchor Point 앵커 포인트 변환 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 88c247c2f1..484a132b5d 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -3265,6 +3265,8 @@ digits Malayalam Malayalam Collate Sorteren Composite colours are converted to it; separations separate with it when it is a CMYK profile. Composietkleuren worden ernaar geconverteerd; separaties worden ermee gescheiden als het een CMYK-profiel is. Convert All Spot Colors to Process Alle spotkleuren omzetten naar proceskleuren + Convert {name} to process {name} omzetten naar proceskleur + Keep {name} as spot {name} als spotkleur behouden Default Printer Standaardprinter Document Ink Options Inktopties voor document Download: Downloaden: diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 4e36d0249a..cf2f97b0ed 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -2836,6 +2836,8 @@ digits Malayalam Malajalam Collate Sortuj Composite colours are converted to it; separations separate with it when it is a CMYK profile. Kolory kompozytowe są do niego konwertowane; rozbarwienia korzystają z niego, gdy jest profilem CMYK. Convert All Spot Colors to Process Konwertuj wszystkie kolory dodatkowe na triadowe + Convert {name} to process Konwertuj {name} na kolor triadowy + Keep {name} as spot Zachowaj {name} jako kolor dodatkowy Default Printer Drukarka domyślna Document Ink Options Opcje farb dokumentu Download: Pobieranie: diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index b5dc29791e..17b5872718 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -561,6 +561,8 @@ antiAlias Sharp Nítido Control Controle Convert Converter Convert All Spot Colors to Process Converter Todas as Cores Spot em Processo + Convert {name} to process Converter {name} em Processo + Keep {name} as spot Manter {name} como Spot Convert All Strokes to Outlines Converter Todos os Traçados em Contornos Convert All Text to Outlines Converter Todo o Texto em Contornos Convert Anchor Point Converter Ponto de Ancoragem diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 92bf430f65..9e51521fcf 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -615,6 +615,8 @@ font-technology Variable Вариативные Control Control Convert Преобразовать Convert All Spot Colors to Process Преобразовать все плашечные цвета в составные + Convert {name} to process Преобразовать {name} в составной цвет + Keep {name} as spot Оставить {name} плашечным цветом Convert All Strokes to Outlines Преобразовать все обводки в контуры Convert All Text to Outlines Преобразовать весь текст в контуры Convert Anchor Point Преобразовать опорную точку diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 7e51593cca..ec798ae9dd 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -604,6 +604,8 @@ font-technology Variable Variabla Control Kontroll Convert Konvertera Convert All Spot Colors to Process Konvertera alla dekorfärger till process + Convert {name} to process Konvertera {name} till process + Keep {name} as spot Behåll {name} som dekorfärg Convert All Strokes to Outlines Konvertera alla konturer till konturbanor Convert All Text to Outlines Konvertera all text till konturbanor Convert Anchor Point Konvertera ankarpunkt diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index e4dfebabc2..1a7ee6265c 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -596,6 +596,8 @@ font-technology Variable Değişken Control Kontrol Convert Dönüştür Convert All Spot Colors to Process Tüm Spot Renkleri Proses Renklere Dönüştür + Convert {name} to process {name} Rengini Prosese Dönüştür + Keep {name} as spot {name} Rengini Spot Olarak Koru Convert All Strokes to Outlines Tüm Konturları Anahatlara Dönüştür Convert All Text to Outlines Tüm Metni Ana Hatlara Dönüştür Convert Anchor Point Bağlantı Noktasını Dönüştür diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index b7fe29b0f1..269bac85f4 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -611,6 +611,8 @@ font-technology Variable Варіативні Control Панель керування Convert Перетворити Convert All Spot Colors to Process Перетворити всі плашкові кольори на складові + Convert {name} to process Перетворити {name} на складовий колір + Keep {name} as spot Залишити {name} плашковим кольором Convert All Strokes to Outlines Перетворити всі обведення на контури Convert All Text to Outlines Перетворити весь текст на контури Convert Anchor Point Перетворити опорну точку diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 8d8a2176aa..1bf0a690a6 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -714,6 +714,8 @@ font-technology Variable Biến thiên Control Điều khiển Convert Chuyển đổi Convert All Spot Colors to Process Chuyển tất cả màu đặc thành màu lai + Convert {name} to process Chuyển {name} thành màu lai + Keep {name} as spot Giữ {name} là màu đặc Convert All Strokes to Outlines Chuyển tất cả nét thành đường bao Convert All Text to Outlines Chuyển tất cả văn bản thành đường bao Convert Anchor Point Chuyển đổi điểm neo diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 9499ea301b..806ae0fb02 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -562,6 +562,8 @@ antiAlias Sharp 锐利 Control 控制栏 Convert 转换 Convert All Spot Colors to Process 将所有专色转换为印刷色 + Convert {name} to process 将 {name} 转换为印刷色 + Keep {name} as spot 将 {name} 保留为专色 Convert All Strokes to Outlines 将所有描边转换为轮廓 Convert All Text to Outlines 将所有文字转换为轮廓 Convert Anchor Point 转换锚点 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 6402da172c..129360d30f 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -579,6 +579,8 @@ font-technology Variable 可變 Control 控制 Convert 轉換 Convert All Spot Colors to Process 將所有特別色轉換為印刷色 + Convert {name} to process 將 {name} 轉換為印刷色 + Keep {name} as spot 將 {name} 保留為特別色 Convert All Strokes to Outlines 將所有筆畫轉換為外框 Convert All Text to Outlines 將所有文字轉換為外框 Convert Anchor Point 轉換錨點 diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rs index a27c8b65ff..4b1d41a0f9 100644 --- a/crates/ui-egui/src/panels/swatches.rs +++ b/crates/ui-egui/src/panels/swatches.rs @@ -46,7 +46,7 @@ pub(crate) use libraries::{ }; #[cfg(test)] pub(crate) use tiles::describe; -pub(crate) use tiles::{draw_folder, folder_tile, global_mark, list_row, list_row_name, tile_grid}; +pub(crate) use tiles::{CMYK_INKS, draw_folder, folder_tile, global_mark, list_row, list_row_name, tile_grid}; /// View modes of the swatch list (and of the library panels: `ui.libraryPanel {view}`). #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)] diff --git a/crates/ui-egui/src/panels/swatches/tiles.rs b/crates/ui-egui/src/panels/swatches/tiles.rs index 42ff8b381c..7e92615c17 100644 --- a/crates/ui-egui/src/panels/swatches/tiles.rs +++ b/crates/ui-egui/src/panels/swatches/tiles.rs @@ -64,7 +64,8 @@ pub(crate) fn draw_folder(ui: &Ui, r: Rect) { } /// The ink colours of the CMYK glyph (cyan, magenta, yellow, black) and the RGB glyph's bars. -const CMYK_INKS: [Color32; 4] = [Color32::from_rgb(0, 174, 239), Color32::from_rgb(236, 0, 140), Color32::from_rgb(255, 242, 0), Color32::BLACK]; +pub(crate) const CMYK_INKS: [Color32; 4] = + [Color32::from_rgb(0, 174, 239), Color32::from_rgb(236, 0, 140), Color32::from_rgb(255, 242, 0), Color32::BLACK]; const RGB_BARS: [Color32; 3] = [Color32::from_rgb(255, 0, 0), Color32::from_rgb(0, 200, 0), Color32::from_rgb(0, 0, 255)]; diff --git a/docs/mcp.md b/docs/mcp.md index 469c5259ef..cae320e2f1 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7509,7 +7509,7 @@ nothing. Opening a document reads a DCS file and its plates again even with the keeps the saved preview of other linked EPS files. These rules are VectorCraft's own: the screen, composite print and exports show the image as its plates mixed into CMYK (each ink amount times the ink's CMYK values, plates combined as `1 − (1 − a)(1 − b)`); Separations Preview and `file.print` separations show each plate on its own ink, and a spot plate prints as the document's swatch -of its ink (else its CMYK values) with `spotsToProcess`. Separations Preview shows a reduced image's plates as the +of its ink (else its CMYK values) with `spotsToProcess` or that ink's own `convertToProcess`. Separations Preview shows a reduced image's plates as the mean of the plate pixels each shown pixel covers. A file may name 64 plates, a plate file may be 1 GB, and the plates together may hold 512 MB of ink amounts; a plate that can't be read is an error naming the plate, and nothing is placed. The plates go on the first plate's pixel grid, grown to hold every plate where it prints; a plate of another size or position is resampled onto @@ -8578,7 +8578,9 @@ picked as the printer, File → Print saves the PDF instead (see Printing). Head `{pages, path | dataBase64, bytes, warnings}`; `print.preview {settings?}` answers what it would print without writing it: `{pages (copies included), sheets: [{artboard, tile?, ink?, width, height, orientation, scale}] (one copy, in order), tiles: [{artboard, columns, rows, printed, tiles}] (document -space), inks: [{name, spot, print, frequency, angle}], warnings, settings}`. `print.setup {settings?}` saves the +space), inks: [{name, spot, print, frequency, angle}] (the plates), documentInks: [{name, spot, print, frequency, +angle, convertToProcess?}] (every ink of the document, the spot inks printing as process included), warnings, +settings}`. `print.setup {settings?}` saves the settings with the document (one undo step, kept in the native file as `print_setup`); both other commands start from the saved settings, or from a print preset's with `preset` (see Print presets), with `settings` over them (`null` keeps a value). `list_commands` with filter `print.setup` @@ -8608,9 +8610,19 @@ documents every field: - `marks` and `bleed` as `document.exportPdf` takes them (the bleed is the document's unless `useDocument: false`), drawn around the artboard at the paper's scale; the page information adds the tile and the ink with its screen. - `output: {mode: composite|separations, emulsion: up|down, image: positive|negative, spotsToProcess, overprintBlack, - inks: [{name, print, frequency, angle}]}`: separations print one page per ink in the gray of its coverage (images - too; overprinting fills, strokes and characters don't knock out), Registration on every plate; emulsion down mirrors - the page and a negative inverts it. + inks: [{name, print, frequency, angle, convertToProcess}]}`: separations print one page per ink in the gray of its + coverage (images too; overprinting fills, strokes and characters don't knock out), Registration on every plate; + emulsion down mirrors the page and a negative inverts it. +- `output.inks[].convertToProcess` (default false) prints one spot ink as process inks: it gets no plate of its own, + and its color prints on the Cyan, Magenta, Yellow and Black plates, while other spot inks keep their plates. The + Print dialog's Document Ink Options list shows an icon before each spot ink's name, and a click on it switches that + ink between spot and process output, as + [the help page](https://helpx.adobe.com/illustrator/using/printing-color-separations.html) describes for single + spot colors. The rest is VectorCraft's own rule. `spotsToProcess` converts every spot ink whatever each one's + own setting says, and the dialog then dims the icons; turning it off again applies each ink's own setting. A + converted ink's `print`, `frequency` and `angle` are kept for when it prints as a spot ink again, and its Print + checkbox and fields are dimmed: `print: false` does not leave its color out of the process plates. Process inks and + Registration have no icon, and `convertToProcess` on a process ink is ignored with a setting note. - `output.overprintBlack` (default false) makes black ink overprint in separations, as the Output step of [Print color separations](https://helpx.adobe.com/illustrator/using/printing-color-separations.html) describes: black art leaves the inks under it on the other plates. Which paints count as black is VectorCraft's own rule: a diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index d71436e08f..5853daff46 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2007,6 +2007,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Separations Preview shows placed and embedded raster images on the visible plates, as it shows vector art (#4153): an RGB image's pixels are separated into process inks with the proof setup's intent, a CMYK image shows its own inks, a hidden plate's ink leaves the image, and with one plate visible the image shows that plate's ink as a grey. Raster images carry no spot ink, so a spot plate shown alone shows them as paper; a colorized image shows its color's plates. Emoji and other bitmap glyphs follow the same rule. The plate-filtered pixels and their reduced-size copies are kept apart from the image's own pixels, for each set of visible plates, proof setup and color settings, and with the preview off nothing changes. Evidence: `tests::colorize::separations_preview_shows_an_rgb_images_process_inks`, `separations_preview_shows_a_cmyk_images_own_inks`, `separations_preview_keeps_an_images_pixels_per_plate_set`. Print preview fidelity remains the open gap, so scores and hours are unchanged. - Desktop print transport uses `craft-print` for CUPS and modern Windows. Sheet composition, copies, separations and colour management remain in VectorCraft. The Print dialog's Media list also carries the Japanese papers — JIS B4 257 × 364 mm, JIS B5 182 × 257 mm and JIS B6 128 × 182 mm beside the ISO B4/B5 (250 × 353 and 176 × 250 mm, kept so settings and presets saved before them keep their paper), and はがき 100 × 148 mm, 往復はがき 148 × 200 mm, 封筒 長形3号 120 × 235 mm, 長形4号 90 × 225 mm, 角形2号 240 × 332 mm, 角形3号 216 × 277 mm and 四六判 127 × 188 mm; the JSON id or the dialog label names a paper, any case and spacing (`B5 (JIS)` or `b5jis`) (`crates/pdf/src/print/settings.rs`, `crates/pdf/src/tests/print.rs`). The print-preview and physical-device fidelity gaps remain, so print scores and hours are unchanged. - The Print dialog's Output section has Overprint Black under Convert All Spot Colors to Process, off by default and available with Separations ([Print color separations](https://helpx.adobe.com/illustrator/using/printing-color-separations.html) lists it among the separation options): black art then leaves the inks under it on the other plates (`print.setup {settings: {output: {overprintBlack: true}}}`, kept with the document and in print presets). Solid 100% K or 100% gray fills, strokes and characters (to within half a percent, as Edit › Edit Colors › Overprint Black counts them), and gradients whose every stop (every color point of a freeform gradient) is, overprint; rich, RGB, Lab, spot-linked and lighter blacks knock out, and only the printed copy is marked. These limits are VectorCraft's own rules. Characters set to overprint now also leave the inks below them on printed PDF plates, a type object's own fill in a PDF is drawn with its blending mode, and Edit › Edit Colors › Overprint Black counts a gradient with a stop linked to a spot swatch as a spot black, as it counts a solid one, and a freeform gradient by the color points it draws from. Evidence: `print::overprint_black_keeps_the_inks_under_solid_black_on_separations`, `print::overprint_black_keeps_the_cyan_under_near_and_freeform_blacks_on_postscript_plates`, `print::overprinting_type_leaves_the_inks_below_on_separations`, `print::a_type_objects_own_black_fill_overprints_on_separations`, `tests::print::overprint_black_is_saved_with_the_setup_and_in_presets`, `overprint::tests::a_gradient_with_a_spot_linked_stop_is_black_only_with_spot`, `overprint::tests::a_freeform_gradient_is_black_when_every_point_is`. Print scores and hours are unchanged. + - The Print dialog's Document Ink Options list shows an icon before each spot ink's name, and a click on it prints that one ink as process inks (on the Cyan, Magenta, Yellow and Black plates, with no plate of its own) or as a spot ink again, as [the help page](https://helpx.adobe.com/illustrator/using/printing-color-separations.html) describes for single spot colors. Other spot inks keep their plates, and spot gradient stops and DCS images' spot plates follow each ink's choice (`print.setup {settings: {output: {inks: [{name, convertToProcess: true}]}}}`, kept with the document and in print presets; `print.preview` lists every ink as `documentInks`). These are VectorCraft's own rules: Convert All Spot Colors to Process converts every spot ink and dims the icons while keeping each ink's own choice, a converted ink's Print, Frequency and Angle are dimmed and kept, and process inks and Registration have no icon. Evidence: `print::one_spot_ink_converts_to_process_and_the_others_keep_their_plates`, `print::converting_every_spot_ink_overrides_and_keeps_each_inks_own_choice`, `print::a_spot_gradient_stop_prints_its_process_plates`, `cmykimages::a_dcs_image_converts_only_the_spot_ink_chosen`, `tests::print::a_spot_ink_converted_to_process_is_saved_and_listed_without_a_plate`, `dialogs::tests_print::a_spot_inks_icon_converts_it_to_process_and_back`. Print scores and hours are unchanged. - The Print dialog's General section (and the print preset editor) has a link button after Scale W and H, as the Custom scale has one on [the help page](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/print-documents-in-illustrator.html), where turning it off scales the width and height apart. While it is on, typing either percentage sets the other, and turning it on sets H to W. It is on for new settings, dimmed with the fields unless Scaling is Custom or a tiling choice, toggled with a click, Space or Enter, and named with its on or off state for screen readers. W and H take 1–1000% in the fields. The link is kept with the document's print settings and in print presets (`print.setup {settings: {scale: {linked}}}`); settings saved without it read it as off, so they print as before. Its default, the tiling choices and the agent rules are VectorCraft's own. Evidence: `print::the_scale_link_is_on_for_new_settings_and_off_for_a_saved_scale_without_it`, `tests::print::the_scale_link_keeps_width_and_height_equal`, `tests::print::a_scale_saved_without_the_link_keeps_its_width_and_height`, `dialogs::tests_print::the_scale_link_keeps_scale_width_and_height_equal`, `dialogs::tests_print::a_print_preset_keeps_the_scale_link`. Print scores and hours are unchanged. - A PDF, PDF-compatible `.ai` or `.ait` opened from its pages or its editing copy opens with the File Info that its XMP packet and its document information dictionary give: the title (`dc:title`, its `x-default` item first, else Info `Title`), the author, description, keywords, copyright status, notice and URL, and the created and modified dates, the XMP packet's value where both give one (`crates/pdf/src/tests/file_info.rs`, `crates/engine/src/tests/fileinfo.rs`). An SVG opens with the title of its root ``. The title is File Info's alone (`DocMetadata::title`): the document's name stays the file's name with its extension, a file that gives no title leaves File Info with that name, and exports (PDF, SVG, PNG, EPS, `.ai`) and native saves carry it; changing the title in File Info sets the document's name as before (#3626). - PDF export and PDF-compatible `.ai` and `.ait` saves write the document's File Info created date as the file's creation date, or the time of writing when the document has none, and the time of writing as its modification date; the page information mark still prints the time of writing (`crates/engine/src/tests/fileinfo.rs`, `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/marks.rs`).