diff --git a/crates/engine/src/cmd/params.rs b/crates/engine/src/cmd/params.rs index fdf7dd4b19..a487b0d657 100644 --- a/crates/engine/src/cmd/params.rs +++ b/crates/engine/src/cmd/params.rs @@ -649,6 +649,7 @@ pub const UNCHECKED: &[&str] = &[ "transparency.setOpacityMask", "transparency.unlinkOpacityMask", "type.pathOptions", + "webExport.optimizeToFileSize", "webExport.presets.save", "webExport.settings", ]; diff --git a/crates/engine/src/cmd/print.rs b/crates/engine/src/cmd/print.rs index bc6d570c91..0826e848cf 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 are not marked, and paints already set to overprint keep it; 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 are not marked, and paints already set to overprint keep it; 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/cmd/webexport.rs b/crates/engine/src/cmd/webexport.rs index 078391d5b7..c6764cddb4 100644 --- a/crates/engine/src/cmd/webexport.rs +++ b/crates/engine/src/cmd/webexport.rs @@ -45,6 +45,15 @@ pub fn specs() -> Vec { has_doc, preview ), + cmd!( + query "webExport.optimizeToFileSize", + "Optimize to File Size", + [], + None, + "{desiredK: the desired file size in K (1024 bytes; above 0, at most 1048576), startWith?: current (default: the format given, its JPEG quality or GIF/PNG-8 colors lowered; GIF then takes lossy 100)|auto (GIF for art with transparency or at most 256 colors (blended over the matte without transparency), else JPEG; the other one when the first can't reach the size and the art is opaque), use?: allSlices (default: the image, or the image slices' files together)|eachSlice (every image slice's file)|currentSlice (the `slice` given, else the selected image slice, else the first), slice?: n (1-based, from slice.list), preset?, …the settings of document.exportForWeb} the settings whose files fit in the size, searched by encoding at most 32 trial settings (each one encodes every image it measures); slices share one setting, which every scope changes → {targetBytes, achieved (false: no setting tried fits, and settings are the smallest one found), bytes (as use measures them), format, settings, trials, images, warnings}; writes nothing and changes no remembered setting", + has_doc, + optimize_to_file_size + ), cmd!( query "webExport.settings", "Save for Web Settings", @@ -1054,6 +1063,297 @@ fn preview(s: &mut Session, p: &Value) -> Result { Ok(out) } +// ---------- Optimize to File Size ---------- + +/// The most trial settings `webExport.optimizeToFileSize` encodes. Each trial encodes every image +/// it measures once. +pub const OPTIMIZE_TRIALS: usize = 32; +/// The largest desired file size, in K (1 GiB). +pub const MAX_DESIRED_K: f64 = 1_048_576.0; + +/// Where Optimize to File Size starts. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum StartWith { + /// The current format, with its JPEG quality or palette colors lowered. + Current, + /// GIF or JPEG, by the image's content. + Auto, +} + +/// The pixels `px` (`[x0, y0, x1, y1]`) of `r` as an image: borrowed when `px` is the whole render, +/// else a copy. +fn file_pixels(r: &WebRender, px: [u32; 4]) -> std::borrow::Cow<'_, [u8]> { + if px == [0, 0, r.width, r.height] { std::borrow::Cow::Borrowed(r.rgba.as_slice()) } else { std::borrow::Cow::Owned(crop(r, px)) } +} + +/// The settings Optimize to File Size found. +#[derive(Clone, Debug)] +pub struct SizeFit { + pub settings: WebSettings, + /// The size the settings give the measured images. + pub bytes: usize, + /// Whether `bytes` is within the target. + pub achieved: bool, + /// The trial settings encoded. + pub trials: usize, +} + +/// The files a search measures and the trials it has left. +struct Trials<'a> { + doc: &'a Document, + r: &'a WebRender, + /// The pixels (`[x0, y0, x1, y1]`) of each file in `r`. + files: &'a [[u32; 4]], + /// Measure the largest file (else the files together). + each: bool, + left: usize, + used: usize, +} + +impl Trials<'_> { + /// The size `s` gives the files, encoded one at a time; `None` when no trial is left. + fn size(&mut self, s: &WebSettings) -> std::result::Result, String> { + if self.left == 0 { + return Ok(None); + } + self.left -= 1; + self.used += 1; + let mut out = 0usize; + for &px in self.files { + let n = optimize(self.doc, &file_pixels(self.r, px), px[2] - px[0], px[3] - px[1], s)?.bytes.len(); + out = if self.each { out.max(n) } else { out.saturating_add(n) }; + } + Ok(Some(out)) + } +} + +/// `(settings, bytes)` of a trial. +pub type Trial = (WebSettings, usize); + +/// Keep `(s, n)` in `smallest` when it is the smallest trial so far. +fn keep_smallest(smallest: &mut Option, s: WebSettings, n: usize) { + if smallest.as_ref().is_none_or(|(_, b)| n < *b) { + *smallest = Some((s, n)); + } +} + +/// The values [`highest_within`] measures spread over its range before it narrows a step. +pub const OPTIMIZE_SAMPLES: u16 = 6; + +/// Measures the size a setting gives; `None` when no trial is left. +pub type MeasureSize<'a> = dyn FnMut(&WebSettings) -> std::result::Result, String> + 'a; + +/// The highest value in `lo..hi` that `set` gives `start` whose size is within `target`, when the +/// value `hi` is over it. A lower value can give a larger file, so the search measures up to +/// [`OPTIMIZE_SAMPLES`] values spread over the range, from `hi - 1` down, stops at the first that +/// fits, and halves the step between it and the measured value above it, keeping the highest value +/// measured within `target`. `None` when no value measured fits or no trial is left; the trials over +/// the target go to `smallest`. +pub fn highest_within( + size: &mut MeasureSize, + start: &WebSettings, + (lo, hi): (u16, u16), + set: fn(&mut WebSettings, u16), + target: usize, + smallest: &mut Option, +) -> std::result::Result, String> { + let with = |v: u16| { + let mut s = start.clone(); + set(&mut s, v); + s + }; + if lo >= hi { + return Ok(None); + } + let span = u32::from(hi - lo); + let samples = u32::from(OPTIMIZE_SAMPLES).min(span); + let (mut above, mut found) = (hi, None); + for i in (0..samples).rev() { + let step = if samples == 1 { 0 } else { (span - 1) * i / (samples - 1) }; + let v = lo.saturating_add(u16::try_from(step).unwrap_or(0)); + let s = with(v); + let Some(n) = size(&s)? else { return Ok(None) }; + if n <= target { + found = Some((v, (s, n))); + break; + } + keep_smallest(smallest, s, n); + above = v; + } + let Some((mut lo, mut best)) = found else { return Ok(None) }; + let mut hi = above; + while hi - lo > 1 { + let mid = lo + (hi - lo) / 2; + let s = with(mid); + let Some(n) = size(&s)? else { break }; + if n <= target { + lo = mid; + best = (s, n); + } else { + keep_smallest(smallest, s, n); + hi = mid; + } + } + Ok(Some(best)) +} + +/// Sets the JPEG quality, for [`highest_within`]. +pub fn set_quality(s: &mut WebSettings, v: u16) { + s.quality = u8::try_from(v).unwrap_or(100); +} + +/// Sets the palette colors, for [`highest_within`]. +pub fn set_colors(s: &mut WebSettings, v: u16) { + s.colors = v; +} + +/// The best settings of `start`'s format within `target`: `start` when it fits, else the highest +/// JPEG quality or the most palette colors [`highest_within`] finds that fit, and for GIF, when none +/// is found, lossy 100 with the most colors that fit. When nothing tried fits, the smallest trial, not achieved. +/// `None` when no trial is left. +fn search_format(t: &mut Trials, start: &WebSettings, target: usize) -> std::result::Result, String> { + let fit = |(settings, bytes): Trial, achieved: bool| SizeFit { settings, bytes, achieved, trials: 0 }; + let Some(n) = t.size(start)? else { return Ok(None) }; + if n <= target { + return Ok(Some(fit((start.clone(), n), true))); + } + let mut smallest = Some((start.clone(), n)); + let found = match start.format { + WebFormat::Jpg => highest_within(&mut |s: &WebSettings| t.size(s), start, (1, u16::from(start.quality)), set_quality, target, &mut smallest)?, + WebFormat::Gif | WebFormat::Png8 => { + match highest_within(&mut |s: &WebSettings| t.size(s), start, (2, start.colors), set_colors, target, &mut smallest)? { + None if start.format == WebFormat::Gif && start.lossy < 100 => { + let lossy = WebSettings { lossy: 100, ..start.clone() }; + match t.size(&lossy)? { + Some(n) if n <= target => Some((lossy, n)), + Some(n) => { + keep_smallest(&mut smallest, lossy.clone(), n); + highest_within(&mut |s: &WebSettings| t.size(s), &lossy, (2, lossy.colors), set_colors, target, &mut smallest)? + } + None => None, + } + } + found => found, + } + } + WebFormat::Png24 => None, + }; + Ok(match (found, smallest) { + (Some(f), _) => Some(fit(f, true)), + (None, Some(s)) => Some(fit(s, false)), + (None, None) => None, + }) +} + +/// The format Auto Select GIF/JPEG starts with, and whether the files (`[x0, y0, x1, y1]` of `r`) +/// are opaque: GIF for files with transparent pixels (when `transparency` keeps them) or at most +/// 256 colors, else JPEG. The colors counted are the ones the files are written with: without +/// `transparency`, the pixels blended over `matte`. +fn auto_format(r: &WebRender, files: &[[u32; 4]], transparency: bool, matte: [u8; 3]) -> (WebFormat, bool) { + let stride = r.width as usize * 4; + let row = + move |y: u32, x0: u32, x1: u32| r.rgba.get(y as usize * stride + x0 as usize * 4..y as usize * stride + x1 as usize * 4).unwrap_or_default(); + let pixels = || files.iter().flat_map(move |&[x0, y0, x1, y1]| (y0..y1).flat_map(move |y| row(y, x0, x1).as_chunks::<4>().0.iter())); + let opaque = !transparency || pixels().all(|p| p[3] == 255); + if !opaque { + return (WebFormat::Gif, false); + } + let mut seen = HashSet::new(); + // An opaque pixel blends to itself. + let few = pixels().all(|p| { + seen.insert(flatten(p, matte).next().unwrap_or_default()); + seen.len() <= 256 + }); + (if few { WebFormat::Gif } else { WebFormat::Jpg }, true) +} + +/// Optimize to File Size: the settings, from `s`, whose files (the pixels `[x0, y0, x1, y1]` of +/// `r`) fit in `target` bytes, measured together, or with `each` the largest one. At most +/// [`OPTIMIZE_TRIALS`] trial settings are encoded, and a trial encodes the files one at a time. +pub fn optimize_to_size( + doc: &Document, + r: &WebRender, + files: &[[u32; 4]], + s: &WebSettings, + start: StartWith, + each: bool, + target: usize, +) -> std::result::Result { + let mut t = Trials { doc, r, files, each, left: OPTIMIZE_TRIALS, used: 0 }; + let with = |format: WebFormat| WebSettings { format, ..s.clone() }; + let found = match start { + _ if files.is_empty() => None, + StartWith::Current => search_format(&mut t, s, target)?, + StartWith::Auto => { + let (first, opaque) = auto_format(r, files, s.transparency, s.matte_rgb()?.unwrap_or([255; 3])); + let other = if first == WebFormat::Gif { WebFormat::Jpg } else { WebFormat::Gif }; + match search_format(&mut t, &with(first), target)? { + Some(a) if !a.achieved && opaque => match search_format(&mut t, &with(other), target)? { + Some(b) if b.achieved || b.bytes < a.bytes => Some(b), + _ => Some(a), + }, + a => a, + } + } + }; + let mut best = found.ok_or("Optimize to File Size: there is no image to measure")?; + best.trials = t.used; + Ok(best) +} + +fn optimize_to_file_size(s: &mut Session, p: &Value) -> Result { + const O: &str = "webExport.optimizeToFileSize"; + let k = p + .get("desiredK") + .and_then(Value::as_f64) + .filter(|k| k.is_finite() && *k > 0.0 && *k <= MAX_DESIRED_K) + .ok_or_else(|| bad(O, "give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576"))?; + let target = ((k * 1024.0).floor() as usize).max(1); + let start = match p.get("startWith").map(Value::as_str) { + None | Some(Some("current")) => StartWith::Current, + Some(Some("auto")) => StartWith::Auto, + Some(_) => return Err(bad(O, "`startWith` is `current` or `auto`")), + }; + let scope = match p.get("use").map(Value::as_str) { + None if p.get("slice").is_some() => "currentSlice", + None => "allSlices", + Some(Some(u @ ("allSlices" | "eachSlice" | "currentSlice"))) => u, + Some(_) => return Err(bad(O, "`use` is `allSlices`, `eachSlice` or `currentSlice`")), + }; + let slice = match p.get("slice").map(|v| v.as_u64().filter(|n| *n >= 1 && scope == "currentSlice")) { + None => None, + Some(Some(n)) => Some(n), + Some(None) => return Err(bad(O, "`slice` is a slice number from `slice.list`, with `use: currentSlice`")), + }; + let settings = s.web_settings(p).map_err(|e| bad(O, e))?; + let st = s.doc()?; + let doc = &st.doc; + let failed = vectorcraft_render::decode_failures(); + let r = render(doc, &settings).map_err(|e| bad(O, e))?; + let warnings = undecoded(failed); + let areas = doc.slice_layout(); + let selected = super::slices::selected_slices(doc, &st.selection); + let cells = cells(&areas, &selected, &settings, &r).map_err(|e| bad(O, e))?; + let image_cells: Vec<&Cell> = + cells.iter().filter(|c| c.area.id.and_then(|id| doc.slice_options(id)).is_none_or(|o| o.kind == SliceKind::Image)).collect(); + let picked: Vec<&Cell> = match (scope, slice) { + ("currentSlice", Some(n)) => { + let c = image_cells.iter().find(|c| c.area.number as u64 == n); + vec![*c.ok_or_else(|| bad(O, format!("no slice {n} in the image (see slice.list)")))?] + } + ("currentSlice", None) => { + image_cells.iter().find(|c| c.area.id.is_some_and(|id| selected.contains(&id))).or(image_cells.first()).copied().into_iter().collect() + } + _ => image_cells, + }; + let files: Vec<[u32; 4]> = if cells.is_empty() { vec![[0, 0, r.width, r.height]] } else { picked.iter().map(|c| c.px).collect() }; + let fit = optimize_to_size(doc, &r, &files, &settings, start, scope == "eachSlice", target).map_err(|e| bad(O, e))?; + Ok(json!({ + "targetBytes": target, "achieved": fit.achieved, "bytes": fit.bytes, "format": fit.settings.format.id(), + "settings": fit.settings.to_json(), "trials": fit.trials, "images": files.len(), "warnings": warnings, + })) +} + fn settings(s: &mut Session, p: &Value) -> Result { const S: &str = "webExport.settings"; let base = if bool_or(p, "reset", false) { WebSettings::default() } else { s.last_web_settings() }; 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/engine/src/tests/webexport.rs b/crates/engine/src/tests/webexport.rs index ccd20e119c..a731e51aca 100644 --- a/crates/engine/src/tests/webexport.rs +++ b/crates/engine/src/tests/webexport.rs @@ -523,3 +523,215 @@ fn setting_keys_are_their_json_values() { .unwrap(); assert_eq!(serde_json::from_value::(custom.to_json()).unwrap(), custom); } + +fn optimize_to(s: &mut Session, p: Value) -> Value { + run(s, "webExport.optimizeToFileSize", p) +} + +/// The size of the file the settings `p` write (the whole image, or slice `slice`). +fn written(s: &mut Session, p: &Value) -> usize { + run(s, "document.exportForWeb.preview", p.clone())["bytes"].as_u64().unwrap() as usize +} + +/// 20×20: 400 one-point squares of different colors (more than a palette holds). +fn photo_like() -> Session { + let mut s = session(20.0, 20.0); + for i in 0..400 { + let (x, y) = ((i % 20) as f64, (i / 20) as f64); + rect(&mut s, [x, y, 1.0, 1.0], &format!("#{:02x}{:02x}{:02x}", (i % 20) * 12, (i / 20) * 12, (i * 7) % 256)); + } + s +} + +#[test] +fn optimize_to_file_size_takes_the_highest_jpeg_quality_that_fits() { + let mut s = many_colours(); + let start = json!({"format": "jpg", "quality": 90}); + let full = written(&mut s, &start); + let k = (full * 3 / 4) as f64 / 1024.0; + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": k}))); + let target = r["targetBytes"].as_u64().unwrap() as usize; + assert_eq!(target, (k * 1024.0).floor() as usize); + assert_eq!((r["achieved"].as_bool(), r["format"].as_str(), r["images"].as_u64()), (Some(true), Some("jpg"), Some(1)), "{r}"); + let q = r["settings"]["quality"].as_u64().unwrap(); + assert!(q < 90, "{r}"); + let bytes = r["bytes"].as_u64().unwrap() as usize; + assert!(bytes <= target, "{r}"); + // The size is the size of the file Save writes with the settings. + assert_eq!(written(&mut s, &r["settings"]), bytes); + assert_eq!(one(&mut s, r["settings"].clone()).len(), bytes); + // One quality step up is over the size. + assert!(written(&mut s, &merge(&r["settings"], json!({"quality": q + 1}))) > target); + assert!(r["trials"].as_u64().unwrap() as usize <= cmd::webexport::OPTIMIZE_TRIALS); + // The other settings stay. + assert_eq!(r["settings"]["matte"], json!("white")); + assert_eq!(r["settings"]["metadata"], json!("copyright")); +} + +#[test] +fn optimize_to_file_size_lowers_palette_colors() { + let mut s = many_colours(); + for format in ["gif", "png8"] { + let start = json!({"format": format, "dither": "none", "colors": 128}); + let full = written(&mut s, &start); + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": (full * 3 / 4) as f64 / 1024.0}))); + let target = r["targetBytes"].as_u64().unwrap() as usize; + assert_eq!((r["achieved"].as_bool(), r["format"].as_str()), (Some(true), Some(format)), "{r}"); + let colors = r["settings"]["colors"].as_u64().unwrap(); + assert!(colors < 64, "{format}: {r}"); + assert_eq!((r["settings"]["lossy"].as_u64(), r["settings"]["dither"].as_str()), (Some(0), Some("none")), "{format}: {r}"); + let bytes = r["bytes"].as_u64().unwrap() as usize; + assert!(bytes <= target && written(&mut s, &r["settings"]) == bytes, "{format}: {r}"); + assert!(written(&mut s, &merge(&r["settings"], json!({"colors": colors + 1}))) > target, "{format}: {r}"); + } +} + +#[test] +fn optimize_to_file_size_auto_selects_gif_or_jpeg_by_content() { + // Flat, opaque art: GIF, from a JPEG start. + let mut flat = two_colours(); + let r = optimize_to(&mut flat, json!({"format": "jpg", "desiredK": 100, "startWith": "auto"})); + assert_eq!((r["format"].as_str(), r["achieved"].as_bool()), (Some("gif"), Some(true)), "{r}"); + // More colors than a palette holds: JPEG, from a GIF start. + let mut photo = photo_like(); + let r = optimize_to(&mut photo, json!({"format": "gif", "desiredK": 100, "startWith": "auto"})); + assert_eq!((r["format"].as_str(), r["achieved"].as_bool()), (Some("jpg"), Some(true)), "{r}"); + // Transparent pixels: GIF, which keeps them. + let mut clear = session(40.0, 30.0); + rect(&mut clear, [0.0, 0.0, 10.0, 10.0], "#000000"); + for (k, transparency, format) in [(100.0, true, "gif"), (100.0, false, "gif"), (0.01, true, "gif")] { + let r = optimize_to(&mut clear, json!({"format": "jpg", "desiredK": k, "startWith": "auto", "transparency": transparency})); + assert_eq!(r["format"].as_str(), Some(format), "{k} {transparency}: {r}"); + } + // The current format stays without auto. + let r = optimize_to(&mut photo, json!({"format": "png8", "desiredK": 100})); + assert_eq!(r["format"].as_str(), Some("png8")); +} + +#[test] +fn optimize_to_file_size_auto_counts_the_colors_blended_over_the_matte() { + // Three colors at 100 opacities: without transparency, 300 colors once blended over the matte. + let mut s = session(20.0, 15.0); + for i in 0..300 { + let (x, y) = ((i % 20) as f64, (i / 20) as f64); + let id = rect(&mut s, [x, y, 1.0, 1.0], ["#000000", "#ff0000", "#0000ff"][i % 3]); + run(&mut s, "transparency.set", json!({"ids": [id], "opacity": i / 3 + 1})); + } + let r = optimize_to(&mut s, json!({"format": "gif", "desiredK": 100, "startWith": "auto", "transparency": false, "antiAlias": "none"})); + assert_eq!((r["format"].as_str(), r["achieved"].as_bool()), (Some("jpg"), Some(true)), "{r}"); + // With transparency the pixels stay transparent: GIF. + let r = optimize_to(&mut s, json!({"format": "jpg", "desiredK": 100, "startWith": "auto", "antiAlias": "none"})); + assert_eq!(r["format"].as_str(), Some("gif"), "{r}"); +} + +#[test] +fn optimize_to_file_size_says_when_no_setting_fits() { + let mut s = many_colours(); + for format in ["jpg", "gif", "png8"] { + let start = json!({"format": format}); + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": 0.01}))); + assert_eq!((r["targetBytes"].as_u64(), r["achieved"].as_bool(), r["format"].as_str()), (Some(10), Some(false), Some(format)), "{r}"); + let bytes = r["bytes"].as_u64().unwrap() as usize; + assert!(bytes > 10 && bytes <= written(&mut s, &start), "{format}: the smallest setting tried: {r}"); + assert_eq!(written(&mut s, &r["settings"]), bytes); + assert!(r["trials"].as_u64().unwrap() as usize <= cmd::webexport::OPTIMIZE_TRIALS); + } + // GIF tries lossy when 2 colors are over. + let r = optimize_to(&mut s, json!({"format": "gif", "desiredK": 0.01})); + assert_eq!(r["settings"]["lossy"], json!(100), "{r}"); + // PNG-24 has nothing to lower. + let r = optimize_to(&mut s, json!({"format": "png24", "desiredK": 0.01})); + assert_eq!((r["achieved"].as_bool(), r["trials"].as_u64()), (Some(false), Some(1)), "{r}"); + assert_eq!(r["settings"], s.web_settings(&json!({"format": "png24"})).unwrap().to_json()); + // Settings that fit stay as they are. + let p = json!({"format": "jpg", "quality": 80, "desiredK": 1000}); + let r = optimize_to(&mut s, p.clone()); + assert_eq!((r["achieved"].as_bool(), r["trials"].as_u64()), (Some(true), Some(1)), "{r}"); + assert_eq!(r["settings"], s.web_settings(&p).unwrap().to_json()); +} + +#[test] +fn optimize_to_file_size_refuses_bad_params_and_changes_nothing() { + let mut s = many_colours(); + run(&mut s, "webExport.settings", json!({"format": "jpg", "quality": 77})); + let remembered = s.last_web_settings(); + for p in [ + json!({}), + json!({"desiredK": 0}), + json!({"desiredK": -5}), + json!({"desiredK": "10"}), + json!({"desiredK": null}), + json!({"desiredK": 2_000_000}), + json!({"desiredK": 10, "startWith": "gif"}), + json!({"desiredK": 10, "startWith": 1}), + json!({"desiredK": 10, "use": "all"}), + json!({"desiredK": 10, "slice": 0}), + json!({"desiredK": 10, "slice": "1"}), + json!({"desiredK": 10, "slice": 1, "use": "eachSlice"}), + json!({"desiredK": 10, "slice": 99}), + json!({"desiredK": 10, "percent": 0}), + ] { + assert!(s.execute("webExport.optimizeToFileSize", &p).is_err(), "{p}"); + } + optimize_to(&mut s, json!({"desiredK": 0.5, "format": "jpg"})); + assert_eq!(s.last_web_settings(), remembered, "the search changes no remembered setting"); +} + +#[test] +fn optimize_to_file_size_measures_the_slices_as_use_says() { + let mut s = session(300.0, 200.0); + rect(&mut s, [0.0, 0.0, 300.0, 200.0], "#336699"); + for i in 0..40 { + rect(&mut s, [f64::from(i) * 7.0, f64::from(i) * 4.0, 30.0, 20.0], &format!("#{:02x}{:02x}40", i * 6, 255 - i * 6)); + } + let a = rect(&mut s, [20.0, 20.0, 100.0, 60.0], "#ff8800"); + run(&mut s, "object.slice.make", json!({"ids": [a]})); + let layout = run(&mut s, "slice.list", json!({}))["slices"].as_array().unwrap().clone(); + let start = json!({"format": "jpg", "quality": 95}); + let sizes = |s: &mut Session, p: &Value| files(&run(s, "document.exportForWeb", p.clone())).iter().map(|(_, b)| b.len()).collect::>(); + let all = sizes(&mut s, &start); + assert_eq!(all.len(), layout.len()); + let total: usize = all.iter().sum(); + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": (total * 3 / 4) as f64 / 1024.0}))); + assert_eq!((r["achieved"].as_bool(), r["images"].as_u64()), (Some(true), Some(layout.len() as u64)), "{r}"); + let after = sizes(&mut s, &r["settings"]); + assert_eq!(after.iter().sum::(), r["bytes"].as_u64().unwrap() as usize, "the slice files together"); + let largest = *all.iter().max().unwrap(); + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": (largest * 3 / 4) as f64 / 1024.0, "use": "eachSlice"}))); + let after = sizes(&mut s, &r["settings"]); + assert_eq!(*after.iter().max().unwrap(), r["bytes"].as_u64().unwrap() as usize, "the largest slice file"); + assert!(r["achieved"].as_bool().unwrap() && after.iter().all(|n| *n <= r["targetBytes"].as_u64().unwrap() as usize), "{r}"); + let n = layout[0]["number"].as_u64().unwrap(); + let one_slice = written(&mut s, &merge(&start, json!({"slice": n}))); + let r = optimize_to(&mut s, merge(&start, json!({"desiredK": (one_slice / 2) as f64 / 1024.0, "slice": n}))); + assert_eq!(r["images"].as_u64(), Some(1)); + assert_eq!(written(&mut s, &merge(&r["settings"], json!({"slice": n}))), r["bytes"].as_u64().unwrap() as usize, "{r}"); +} + +#[test] +fn optimize_to_file_size_finds_a_fit_when_a_lower_setting_gives_a_larger_file() { + use cmd::webexport::{OPTIMIZE_SAMPLES, WebSettings, highest_within, set_quality}; + // Sizes that do not fall with the quality: 1 to 20 give 900 bytes, 21 to 70 give 400 to 449, + // and 71 and up give over 1000. + let size_of = |q: u8| match q { + ..=20 => 900, + 21..=70 => 400 + usize::from(q - 21), + _ => 1000 + usize::from(q), + }; + let start = WebSettings { quality: 90, ..WebSettings::default() }; + let mut measured = Vec::new(); + let mut smallest = None; + let mut size = |s: &WebSettings| { + measured.push(s.quality); + Ok(Some(size_of(s.quality))) + }; + let found = highest_within(&mut size, &start, (1, 90), set_quality, 500, &mut smallest).unwrap(); + let (settings, bytes) = found.expect("a quality within 500 bytes"); + assert_eq!((settings.quality, bytes), (70, 449), "measured {measured:?}"); + assert!(measured.len() <= usize::from(OPTIMIZE_SAMPLES) + 7, "measured {measured:?}"); + // Nothing fits: the smallest size measured is kept. + let mut smallest = None; + let mut size = |s: &WebSettings| Ok(Some(size_of(s.quality))); + assert!(highest_within(&mut size, &start, (1, 90), set_quality, 100, &mut smallest).unwrap().is_none()); + assert_eq!(smallest.map(|(s, n)| (s.quality, n)), Some((36, 415))); +} diff --git a/crates/pdf/src/import/builder.rs b/crates/pdf/src/import/builder.rs index e6e34ae429..a9cd9ada7c 100644 --- a/crates/pdf/src/import/builder.rs +++ b/crates/pdf/src/import/builder.rs @@ -991,7 +991,7 @@ impl<'p> Builder<'p> { self.flush_type3(); if let (Some(s), Some(line)) = (&look.stroke, &mut self.text) && look.fill.is_none() - && line.stroke_last(font_key, at, s.clone(), overprint) + && line.stroke_filled(font_key, at, opacity, &text, s.clone(), overprint) { return true; } @@ -1153,9 +1153,13 @@ impl<'p> Builder<'p> { // A stroke over the glyph just filled (fill and stroke rendering). if let (Some(s), Some(line)) = (&look.stroke, &mut self.text) && look.fill.is_none() - && line.stroke_last(key, at, s.clone(), overprint) + && line.stroke_filled(key, at, opacity, &text, s.clone(), overprint) { - self.keep_glyph(o, m, drawn, opacity, scale, overprint); + // Upright glyphs aren't kept as outlines (nor, below, are those filled only): a + // vertical line that came in as its outlines would lose the ones filled only. + if top.is_none() { + self.keep_glyph(o, m, drawn, opacity, scale, overprint); + } return true; } if !self.text.as_mut().is_some_and(place) { diff --git a/crates/pdf/src/import_text.rs b/crates/pdf/src/import_text.rs index ec4fff092a..2d73f4b925 100644 --- a/crates/pdf/src/import_text.rs +++ b/crates/pdf/src/import_text.rs @@ -61,6 +61,17 @@ impl Placement { fn up(&self) -> Vec2 { Vec2::new(self.dir.y, -self.dir.x) } + + /// Is a glyph placed with `other` drawn where this one is, the same size, width, slant and + /// direction (a stroke the reader draws over a glyph it filled has the very same placement; + /// the tolerances only allow for rounding)? + fn same_as(&self, other: &Placement) -> bool { + (self.origin - other.origin).hypot() < self.size * 1e-3 + && (self.size - other.size).abs() <= self.size * 1e-3 + && (self.h_scale - other.h_scale).abs() < 0.05 + && (self.slant - other.slant).abs() < 1e-3 + && self.dir.dot(other.dir) > 1.0 - 1e-6 + } } /// A glyph set vertically (WMode 1: no horizontal advance) and the top centre of its em box: a @@ -219,6 +230,17 @@ pub(crate) struct TextLine { authored: Vec, /// Fill callbacks in an authored span, for the reader's later stroke pass. actual_fills: HashMap<(u128, u64, u64), Option>, + /// The glyphs filled without a stroke, in drawing order, for a stroke drawn over them later + /// ([`stroke_filled`](Self::stroke_filled)). + filled: Vec, + /// The first of [`filled`](Self::filled) a stroke may still be drawn over: a stroke matches + /// glyphs in the order they were filled, and each at most once. + stroked: usize, + /// Glyphs stroked so far that are still to be restyled: a stroke pass over a word restyles it + /// once, as a whole ([`flush_stroke`](Self::flush_stroke)). + pending: Option, + /// The last glyph's placement. + last_at: Placement, /// The first glyph was set vertically ([`Upright`]). upright: Option, /// The glyphs make a column (vertical type), each below the last. @@ -251,6 +273,28 @@ struct Slot { advance: Option, } +/// A glyph filled without a stroke: its font and placement, and where its text is in the line's +/// runs (the run's index, the text's byte offset in it and its length). +#[derive(Clone, Copy, Debug)] +struct Filled { + font: u128, + at: Placement, + run: usize, + start: usize, + len: usize, +} + +/// Glyphs next to each other in one run that a stroke is drawn over, not yet restyled +/// ([`TextLine::stroke_filled`]): the run's index, the text's byte range in it, and the stroke. +#[derive(Clone, Debug)] +struct PendingStroke { + run: usize, + start: usize, + end: usize, + stroke: TypeStroke, + overprint: bool, +} + /// What a finished line of type tells beyond its text object (see [`crate::import_lines`]). #[derive(Clone, Debug, Default)] pub(crate) struct LineFacts { @@ -283,6 +327,10 @@ impl TextLine { slots: vec![], authored: vec![], actual_fills: HashMap::new(), + filled: vec![], + stroked: 0, + pending: None, + last_at: at, upright: None, column: false, ink: vec![], @@ -313,12 +361,15 @@ impl TextLine { } pub fn push_upright_content(&mut self, look: &Look, at: Placement, opacity: f32, upright: Upright, content: TextContent<'_>) -> bool { + self.flush_stroke(); let text = content.text(); if !text.is_empty() && self.authored.is_empty() && self.upright.is_some() { // Suppressed vertical glyphs likewise provide no text anchor. self.at = at; self.opacity = opacity; self.runs.clear(); + self.filled.clear(); + self.stroked = 0; self.column = false; } let down = -self.at.up(); @@ -327,8 +378,9 @@ impl TextLine { self.runs.push((look.clone(), 0.0, text.to_string())); self.last_start = 0; self.record_actual_fill(look, at, content); + self.record_filled(look, at, content); self.authored.extend(text.chars().map(|_| content.authored())); - (self.upright, self.next, self.last) = (Some(upright), at.origin + down * at.size, at.origin); + (self.upright, self.next, self.last, self.last_at) = (Some(upright), at.origin + down * at.size, at.origin, at); return true; }; let across = (at.origin - self.at.origin).dot(self.at.dir); @@ -364,9 +416,11 @@ impl TextLine { self.last_start = 0; } self.record_actual_fill(look, at, content); + self.record_filled(look, at, content); self.authored.extend(text.chars().map(|_| content.authored())); self.next = at.origin + down * at.size; self.last = at.origin; + self.last_at = at; true } @@ -377,6 +431,7 @@ impl TextLine { } pub fn push_content(&mut self, look: &Look, at: Placement, opacity: f32, advance: f64, content: TextContent<'_>) -> bool { + self.flush_stroke(); let text = content.text(); let pen = matches!(content, TextContent::Pen); // A vertical line (even a single upright glyph) takes no horizontal glyphs. @@ -394,6 +449,8 @@ impl TextLine { self.last_size = at.size; self.baseline.clear(); self.runs.clear(); + self.filled.clear(); + self.stroked = 0; } let bytes = self.text_bytes; let glyph = self.baseline.len(); @@ -461,6 +518,7 @@ impl TextLine { self.last_start = 0; } self.record_actual_fill(look, at, content); + self.record_filled(look, at, content); self.text_bytes = self.text_bytes.saturating_add(text.len()); if !pen { let one = text.chars().count() == 1 && !content.authored(); @@ -475,6 +533,7 @@ impl TextLine { self.visible = self.next; } self.last = at.origin; + self.last_at = at; self.last_dir = at.dir; self.last_size = at.size; self.baseline.push(at.origin); @@ -488,10 +547,22 @@ impl TextLine { } } + /// Note glyph `content` just added to the last run, filled without a stroke, for a stroke + /// drawn over it later. + fn record_filled(&mut self, look: &Look, at: Placement, content: TextContent<'_>) { + let len = content.text().len(); + if content.authored() || len == 0 || look.fill.is_none() || look.stroke.is_some() { + return; + } + let run = self.runs.len().saturating_sub(1); + self.filled.push(Filled { font: look.font, at, run, start: self.last_start, len }); + } + /// The reader fills a whole Tj/TJ before replaying its glyphs as strokes. A replay /// must neither consume the replacement nor rewind the pen. Only the first glyph's /// style belongs to the replacement; suppressed glyphs have no text to restyle. pub fn stroke_actual(&mut self, font: u128, at: Placement, stroke: TypeStroke, overprint: bool) -> bool { + self.flush_stroke(); let key = (font, at.origin.x.to_bits(), at.origin.y.to_bits()); let Some(run) = self.actual_fills.remove(&key) else { return false }; if let Some((look, ..)) = run.and_then(|i| self.runs.get_mut(i)) { @@ -529,19 +600,156 @@ impl TextLine { Some(bp) } - /// A stroke (`stroke`: paint, width, cap, join and miter limit) over the glyph just drawn at - /// `at` in `font` (fill and stroke rendering), which `overprint`s or not: that glyph is - /// stroked. `false`: it isn't that glyph. + /// A stroke (`stroke`: paint, width, cap, join and miter limit) over glyph `text` drawn at + /// `at` in `font` at `opacity`, which `overprint`s or not, after the glyph was filled (fill + /// and stroke rendering): that glyph is stroked. `false`: no glyph on the line was filled so. + /// + /// The reader fills all the glyphs a text-showing operator (`Tj`, `TJ`, `'`, `"`) draws + /// before it strokes them (#8015), or fills and strokes glyph by glyph: either way each + /// stroke is matched to the next glyph filled with the same placement (where, how large, how + /// wide, slanted and turned), in the same font with the same text, in order. Only that + /// glyph's text takes the stroke; strokes over glyphs next to each other in a run gather and + /// restyle their text as one run, so a word filled whole and stroked whole stays one run. The + /// glyphs around them keep their own stroke or none (#7741). + /// + /// Only opaque type takes its stroke: the file composites a translucent fill and stroke + /// apiece, darker where they overlap, while one object's opacity applies to its fill and + /// stroke together. Translucent fill and stroke stay type objects of their own, as do a fill + /// and stroke at different opacities. + pub fn stroke_filled(&mut self, font: u128, at: Placement, opacity: f32, text: &str, stroke: TypeStroke, overprint: bool) -> bool { + // A stroke at another opacity than the fill's (`CA` and `ca` differ), or over a + // translucent fill, is type of its own. + let opaque = opacity >= 0.999 && self.opacity >= 0.999; + let rest = if opaque { self.filled.get(self.stroked..) } else { None }; + let found = rest.and_then(|rest| { + rest.iter().position(|g| { + g.font == font + && g.at.same_as(&at) + && self.runs.get(g.run).and_then(|(.., t)| t.get(g.start..g.start.saturating_add(g.len))) == Some(text) + }) + }); + let Some(index) = found.map(|i| self.stroked.saturating_add(i)) else { + // Stroked text of its own (stroke rendering): no later stroke goes back over the + // glyphs filled before it, so no stroke looks through them again. + self.stroked = self.filled.len(); + // Nor does a translucent stroke join the glyph just filled. + return opaque && self.stroke_last(font, at, text, stroke, overprint); + }; + let continues = self + .pending + .as_ref() + .zip(self.filled.get(index)) + .is_some_and(|(p, g)| p.run == g.run && p.end == g.start && p.stroke == stroke && p.overprint == overprint); + if continues { + let end = self.filled.get(index).map(|g| g.start.saturating_add(g.len)); + if let (Some(p), Some(end)) = (&mut self.pending, end) { + p.end = end; + } + } else { + // Restyling what was gathered can move this glyph's text to another run: look it up after. + self.flush_stroke(); + if let Some(g) = self.filled.get(index) { + self.pending = Some(PendingStroke { run: g.run, start: g.start, end: g.start.saturating_add(g.len), stroke, overprint }); + } + } + self.stroked = index.saturating_add(1); + true + } + + /// Restyle the glyphs gathered for a stroke ([`stroke_filled`](Self::stroke_filled)): their + /// text becomes a run of its own with the stroke, unless the run is stroked so already, and the + /// text before and after it in the run keeps its stroke. A run they make up whole is stroked + /// whole; text that comes right after a run drawn alike joins it. + fn flush_stroke(&mut self) { + let Some(PendingStroke { run, start, end, stroke, overprint }) = self.pending.take() else { return }; + let last = run.saturating_add(1) == self.runs.len(); + let previous = run.checked_sub(1).and_then(|i| self.runs.get(i)).map(|(l, sh, t)| (l.clone(), *sh, t.len())); + let Some((look, shift, text)) = self.runs.get_mut(run) else { return }; + if look.stroke.as_ref() == Some(&stroke) && look.overprint_stroke == overprint { + return; + } + if !(start < end && end <= text.len() && text.is_char_boundary(start) && text.is_char_boundary(end)) { + return; + } + if start == 0 && end == text.len() { + (look.stroke, look.overprint_stroke) = (Some(stroke), overprint); + return; + } + let tail = text.split_off(end); + let glyphs = text.split_off(start); + let head = std::mem::take(text); + let mut own = look.clone(); + (own.stroke, own.overprint_stroke) = (Some(stroke), overprint); + let (old, shift) = (look.clone(), *shift); + // The stroked text joins the run before when nothing is left before it in its own run and + // that run is drawn alike. + let joins = match &previous { + Some((l, sh, _)) => head.is_empty() && *l == own && (sh - shift).abs() < 1e-3, + None => false, + }; + let joined_at = previous.as_ref().map_or(0, |(.., len)| *len); + let mut pieces = vec![]; + if !head.is_empty() { + pieces.push((old.clone(), shift, head.clone())); + } + // Where each part of the run's text goes: its run and how far its new run's text starts + // before it (bytes), for the head, the stroked glyphs and the tail. + let head_at = (run, 0usize); + let glyphs_at = if joins { + (run.saturating_sub(1), joined_at) + } else { + pieces.push((own, shift, glyphs.clone())); + (run.saturating_add(pieces.len()).saturating_sub(1), 0) + }; + if !tail.is_empty() { + pieces.push((old, shift, tail)); + } + let tail_at = run.saturating_add(pieces.len()).saturating_sub(1); + let count = pieces.len(); + if joins && let Some((.., t)) = run.checked_sub(1).and_then(|i| self.runs.get_mut(i)) { + t.push_str(&glyphs); + } + self.runs.splice(run..run.saturating_add(1), pieces); + let moved = |r: usize, at: usize| -> (usize, usize) { + if r > run { + (r.saturating_add(count).saturating_sub(1), at) + } else if r < run { + (r, at) + } else if at < start { + (head_at.0, at) + } else if at < end { + (glyphs_at.0, at.saturating_sub(start).saturating_add(glyphs_at.1)) + } else { + (tail_at, at.saturating_sub(end)) + } + }; + let from = self.stroked.min(self.filled.len()); + for g in self.filled.iter_mut().skip(from) { + (g.run, g.start) = moved(g.run, g.start); + } + for i in self.actual_fills.values_mut().flatten() { + *i = moved(*i, 0).0; + } + if last { + self.last_start = moved(run, self.last_start).1; + } + } + + /// A stroke over glyph `glyph` just drawn at `at` in `font`, which `overprint`s or not: that + /// glyph is stroked. `false`: it isn't that glyph (another place, font or text). /// /// A filled glyph joins a run of the same fill whatever its stroke ([`Look::takes`]), so the /// run can hold glyphs before it that are stroked otherwise or not at all: then the glyph's /// text becomes a run of its own with this stroke, and the glyphs before it keep theirs /// (#7741). The line's text is the same either way, so the characters' slots, gaps and /// authored flags, kept along the whole line, still line up. - pub fn stroke_last(&mut self, font: u128, at: Placement, stroke: TypeStroke, overprint: bool) -> bool { + fn stroke_last(&mut self, font: u128, at: Placement, glyph: &str, stroke: TypeStroke, overprint: bool) -> bool { + self.flush_stroke(); let start = self.last_start; + let last_at = self.last_at; + // The glyph just filled, in the same font and placement, with the same text. let Some((look, shift, text)) = - self.runs.last_mut().filter(|(l, ..)| l.font == font && (at.origin - self.last).hypot() < self.at.size * 1e-3) + self.runs.last_mut().filter(|(l, _, t)| l.font == font && last_at.same_as(&at) && t.get(start..) == Some(glyph)) else { return false; }; @@ -563,6 +771,7 @@ impl TextLine { /// The point type object, its opacity and what else the line tells. pub fn finish(mut self) -> Option<(TextObject, f32, LineFacts)> { + self.flush_stroke(); let mut facts = LineFacts { ink: std::mem::take(&mut self.ink), ..LineFacts::default() }; // Turned along a curve: type on a path through the glyphs. let path = if self.curved() { self.baseline_path() } else { None }; 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 { @@ -218,12 +251,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 3748ec5106..49a34ff428 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 { @@ -988,6 +1073,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/pdf/src/tests/reader_compat.rs b/crates/pdf/src/tests/reader_compat.rs index d292a03192..1c9ba71d7f 100644 --- a/crates/pdf/src/tests/reader_compat.rs +++ b/crates/pdf/src/tests/reader_compat.rs @@ -81,8 +81,13 @@ fn form_resource_scopes_keep_scanned_overprint_in_step_with_interpretation() { } pub(crate) fn text_pdf(content: &str) -> Vec { + text_pdf_with("/ca 0.25 /CA 0.75", content) +} + +/// [`text_pdf`] with graphics state `/G` set by `state` (its entries, such as `/ca 0.5 /CA 0.5`). +pub(crate) fn text_pdf_with(state: &str, content: &str) -> Vec { page( - "/Font << /F1 5 0 R >> /ExtGState << /G << /ca 0.25 /CA 0.75 >> >>", + &format!("/Font << /F1 5 0 R >> /ExtGState << /G << {state} >> >>"), content.as_bytes(), &[ b"<< /Type /Font /Subtype /TrueType /BaseFont /Inter-Regular /Encoding /WinAnsiEncoding /FirstChar 65 /LastChar 67 /Widths [600 600 600] /FontDescriptor 6 0 R >>".to_vec(), diff --git a/crates/pdf/src/tests/reshaped.rs b/crates/pdf/src/tests/reshaped.rs index af173fa55b..f73450b380 100644 --- a/crates/pdf/src/tests/reshaped.rs +++ b/crates/pdf/src/tests/reshaped.rs @@ -38,6 +38,11 @@ fn page(drawn: &[char], sign_width: Option) -> Vec { /// graphics state, to set between glyphs or before them, with `objects` it refers to (the first /// is object `first_extra(1) + 4`). fn page_with(ops: impl Fn(&dyn Fn(char) -> String) -> String, extra: &str, objects: &[String], sign_width: Option) -> Vec { + page_in("Identity-H", ops, extra, objects, sign_width) +} + +/// [`page_with`] with the Type 0 font's encoding `encoding` (`Identity-V`: vertical writing). +fn page_in(encoding: &str, ops: impl Fn(&dyn Fn(char) -> String) -> String, extra: &str, objects: &[String], sign_width: Option) -> Vec { FontDb::global().add_font(matra_font().expect("the test font builds")); let program = matra_font().unwrap(); let hex: String = program.iter().map(|b| format!("{b:02X}")).collect::() + ">"; @@ -66,7 +71,7 @@ fn page_with(ops: impl Fn(&dyn Fn(char) -> String) -> String, extra: &str, objec ]; let refs: Vec<&str> = objs.iter().chain(objects).map(String::as_str).collect(); let resources = format!( - "/Font << /F1 << /Type /Font /Subtype /Type0 /BaseFont /MatratestSans-Regular /Encoding /Identity-H /DescendantFonts [{} 0 R] /ToUnicode {} 0 R >> >> {extra}", + "/Font << /F1 << /Type /Font /Subtype /Type0 /BaseFont /MatratestSans-Regular /Encoding /{encoding} /DescendantFonts [{} 0 R] /ToUnicode {} 0 R >> >> {extra}", n + 2, n + 3 ); @@ -218,3 +223,22 @@ fn outlined_glyphs_under_a_varying_soft_mask_are_masked_one_by_one() { assert_eq!(outlines(&report.document), 3, "a path each"); assert_eq!(masked_outlines(&report.document), 3, "each path has its own mask"); } + +/// A vertical line (upright glyphs) with one glyph filled and stroked: its glyphs aren't kept as +/// outlines, so it can't come in as the outlines of that glyph alone, losing the glyph filled +/// only. Every glyph comes in filled (#8015). +#[test] +fn a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled() { + let bytes = page_in("Identity-V", |id| format!("1 0 0 rg 0 0 1 RG 2 w {} Tj 2 Tr {} Tj 0 Tr", id(KA), id(SIGN_I)), "", &[], None); + let report = open(&bytes); + let mut runs = vec![]; + report.document.walk(|n| { + if let NodeKind::Text(t) = &n.kind { + runs.extend(t.runs.iter().map(|r| (r.text.clone(), !r.style.fill.is_none(), !r.style.stroke.is_none()))); + } + }); + let filled: String = runs.iter().filter(|r| r.1).map(|r| r.0.as_str()).collect(); + assert_eq!(filled, format!("{KA}{SIGN_I}"), "every glyph filled: {runs:?}"); + let stroked: String = runs.iter().filter(|r| r.2).map(|r| r.0.as_str()).collect(); + assert_eq!(stroked, SIGN_I.to_string(), "{runs:?}"); +} diff --git a/crates/pdf/src/tests/text_placement.rs b/crates/pdf/src/tests/text_placement.rs index 417a88e5b9..8bdde71eba 100644 --- a/crates/pdf/src/tests/text_placement.rs +++ b/crates/pdf/src/tests/text_placement.rs @@ -758,3 +758,19 @@ fn perf_text_heavy_open() { println!("4000 lines: {n} text objects in {took:?} (as outlines: {:?})", start.elapsed()); } } + +/// Vertical type filled, then stroked (fill and stroke rendering draws a whole operator's glyphs +/// filled before it strokes them): one column, each glyph filled and stroked (#8015). +#[test] +fn a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type() { + for mode in ["2", "6"] { + let content = format!("0 0 1 RG 1 0 0 rg 2 w BT {mode} Tr /F6 24 Tf 150 180 Td {} Tj 0 Tr ET", gids("§±×")); + let t = texts(&open_as(&page(&content, ""), TextAs::Text)); + assert_eq!(t.len(), 1, "{content}: {t:#?}"); + assert_eq!(t[0].plain_text(), "§±×"); + for r in &t[0].runs { + assert!(!r.style.fill.is_none() && !r.style.stroke.is_none(), "{content}: {:?}", t[0].runs); + assert!((r.style.stroke_width - 2.0).abs() < 1e-6, "{content}"); + } + } +} diff --git a/crates/pdf/src/tests/textstroke.rs b/crates/pdf/src/tests/textstroke.rs index f28e525f27..0025bad9f5 100644 --- a/crates/pdf/src/tests/textstroke.rs +++ b/crates/pdf/src/tests/textstroke.rs @@ -122,3 +122,178 @@ fn imported_stroked_type_keeps_the_files_cap_join_and_miter_limit() { assert_eq!(joins, [Some(LineJoin::Round), Some(LineJoin::Miter)], "{content}: {runs:?}"); } } + +/// Fill and stroke rendering (mode 2, or 6 with a clip) draws a text-showing operator's glyphs +/// filled, then the same glyphs stroked: the type comes in once, filled and stroked, whether the +/// operator shows one glyph or a word, or a TJ array of strings with kerning between them, in an +/// outline font, with or without replacement text (`ActualText`). Stroke rendering (modes 1 and 5) stays stroke only. A Type 3 glyph is filled in +/// every one of those modes, once (#8015). +#[test] +fn a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type() { + use vectorcraft_testkit::pdf::{PdfPage, first_extra, pdf_with}; + // `/T3`: a Type 3 font whose glyphs take the text's paint (`d1`), `W A V E` mapped by ToUnicode. + let t3 = first_extra(1); + let glyph = crate::tests_import_fidelity::stream("", "600 0 0 0 600 700 d1 0 0 m 600 0 l 300 700 l h f"); + let to_unicode = crate::tests_import_fidelity::stream( + "", + "/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def /CMapName /T3-UCS def /CMapType 2 def 1 begincodespacerange <00> endcodespacerange 4 beginbfchar\n<41> <0041>\n<45> <0045>\n<56> <0056>\n<57> <0057>\nendbfchar endcmap CMapName currentdict /CMap defineresource pop end end", + ); + let font = format!( + "<< /Type /Font /Subtype /Type3 /FontBBox [0 0 600 700] /FontMatrix [0.001 0 0 0.001 0 0] /CharProcs << /g {} 0 R >> /Encoding << /Type /Encoding /Differences [65 /g 69 /g 86 /g 87 /g] >> /FirstChar 65 /LastChar 87 /Widths [600 0 0 0 600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600 600] /ToUnicode {} 0 R /Resources << >> >>", + t3 + 1, + t3 + 2 + ); + let page = |content: &str| { + let resources = format!("/Font << /F1 << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >> /T3 {t3} 0 R >>"); + pdf_with(&[PdfPage { resources, ..PdfPage::new(300.0, 200.0, content) }], &[&font, &glyph, &to_unicode], None) + }; + let objects = |content: &str| { + let d = import(&page(content)).unwrap(); + let mut types = vec![]; + d.walk(|n| { + if let NodeKind::Text(t) = &n.kind { + types.push((**t).clone()); + } + }); + types + }; + let cream = Paint::solid(Color::rgb8(0xff, 0xff, 0xcc)); + let black = Paint::solid(Color::BLACK); + let shows = + ["(WAVE) Tj", "[(WA) -50 (VE)] TJ", "(WA) Tj (VE) Tj", "(W) Tj (A) Tj (V) Tj (E) Tj", "/Span << /ActualText (WAVE) >> BDC (WAVE) Tj EMC"]; + for font in ["F1", "T3"] { + for show in shows { + for mode in ["0", "1", "2", "4", "5", "6"] { + let content = format!("0 0 0 RG 1 1 0.8 rg 3 w 1 J 1 j BT {mode} Tr /{font} 60 Tf 40 110 Td {show} 0 Tr ET"); + let types = objects(&content); + assert_eq!(types.len(), 1, "{content}: one type object: {types:#?}"); + let t = &types[0]; + assert_eq!(t.plain_text(), "WAVE", "{content}"); + // A Type 3 glyph paints itself: the reader fills it whatever the mode. + let (fill, stroke) = match mode { + _ if font == "T3" => (true, false), + "0" | "4" => (true, false), + "1" | "5" => (false, true), + _ => (true, true), + }; + for r in &t.runs { + let s = &r.style; + assert_eq!(s.fill, if fill { cream.clone() } else { Paint::None }, "{content}: fill: {:?}", t.runs); + if stroke { + assert_eq!(s.stroke, black, "{content}: stroke: {:?}", t.runs); + assert!((s.stroke_width - 3.0).abs() < 1e-6, "{content}: width {}", s.stroke_width); + assert_eq!((s.stroke_cap, s.stroke_join), (LineCap::Round, LineJoin::Round), "{content}"); + } else { + assert!(s.stroke.is_none(), "{content}: no stroke: {:?}", t.runs); + } + } + } + } + } + // A word filled, then stroked with another join part way through (one operator each): + // each part keeps its own join, all of it filled. + let content = "0 0 0 RG 1 1 0.8 rg 3 w BT 2 Tr /F1 60 Tf 40 110 Td 1 j (WA) Tj 0 j (VE) Tj 0 Tr ET"; + let types = objects(content); + assert_eq!(types.len(), 1, "{content}: {types:#?}"); + let joins: Vec<_> = types[0].runs.iter().map(|r| (r.text.as_str(), r.style.fill == cream, r.style.stroke_join)).collect(); + assert_eq!(joins, [("WA", true, LineJoin::Round), ("VE", true, LineJoin::Miter)], "{content}"); + // Filled type, then stroked type of its own elsewhere: a stroke over no filled glyph. + let content = "0 0 0 RG 1 1 0.8 rg 3 w BT 0 Tr /F1 60 Tf 40 110 Td (WAVE) Tj 1 Tr 0 -70 Td (WAVE) Tj 0 Tr ET"; + let types = objects(content); + assert_eq!(types.len(), 2, "{content}: {types:#?}"); + let looks: Vec<_> = types.iter().flat_map(|t| &t.runs).map(|r| (r.style.fill == cream, !r.style.stroke.is_none())).collect(); + assert_eq!(looks, [(true, false), (false, true)], "{content}"); +} + +/// Helvetica PDF page drawing `content`, imported: each run of type as its text, size, and +/// whether it is filled and stroked, in text order. +fn word_runs(content: &str) -> Vec<(String, f64, bool, bool)> { + use vectorcraft_testkit::pdf::{PdfPage, pdf}; + let resources = "/Font << /F1 << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >> >>"; + let bytes = pdf(&[PdfPage { resources: resources.into(), ..PdfPage::new(300.0, 200.0, content) }], None); + let d = import(&bytes).unwrap(); + let mut runs = vec![]; + d.walk(|n| { + if let NodeKind::Text(t) = &n.kind { + runs.extend(t.runs.iter().map(|r| (r.text.clone(), r.style.size, !r.style.fill.is_none(), !r.style.stroke.is_none()))); + } + }); + runs.sort_by(|a, b| a.0.cmp(&b.0).then(a.1.total_cmp(&b.1))); + runs +} + +/// A stroke goes only over a glyph filled with the very same placement: a word filled, then its +/// first glyph stroked at another size from the same origin, is two pieces of type, the word +/// unstroked and the glyph at its own size (#8015). +#[test] +fn a_stroke_at_another_size_does_not_go_over_the_filled_glyph() { + for mode in ["1", "2"] { + let content = format!("0 0 0 RG 1 1 0.8 rg 3 w BT /F1 60 Tf 40 110 Td (WAVE) Tj ET BT {mode} Tr /F1 30 Tf 40 110 Td (W) Tj 0 Tr ET"); + let filled = mode == "2"; + assert_eq!(word_runs(&content), [("W".to_string(), 30.0, filled, true), ("WAVE".to_string(), 60.0, true, false)], "{content}"); + } +} + +/// A stroke over one glyph of a filled word strokes that glyph alone, not the rest of the word +/// (#8015). +#[test] +fn a_stroke_over_one_glyph_of_a_filled_word_strokes_only_that_glyph() { + // W alone stroked at the same size from the same origin: W is stroked, AVE not. + let content = "0 0 0 RG 1 1 0.8 rg 3 w BT /F1 60 Tf 40 110 Td (WAVE) Tj ET BT 1 Tr /F1 60 Tf 40 110 Td (W) Tj 0 Tr ET"; + assert_eq!(word_runs(content), [("AVE".to_string(), 60.0, true, false), ("W".to_string(), 60.0, true, true)], "{content}"); + // Filled and stroked there instead: that W is drawn again, over the word, as type of its own. + let content = "0 0 0 RG 1 1 0.8 rg 3 w BT /F1 60 Tf 40 110 Td (WAVE) Tj ET BT 2 Tr /F1 60 Tf 40 110 Td (W) Tj 0 Tr ET"; + assert_eq!(word_runs(content), [("W".to_string(), 60.0, true, true), ("WAVE".to_string(), 60.0, true, false)], "{content}"); +} + +/// A glyph filled at one opacity and stroked at another (`ca` and `CA` differ) stays two pieces +/// of type, each at its own opacity, also when it is shown on its own, so the stroke is drawn +/// right after its fill (#8015). Two such operators are four pieces in the order they are drawn, +/// the second glyph's fill over the first one's stroke. +#[test] +fn a_glyph_stroked_at_another_opacity_than_its_fill_stays_its_own_type() { + let (fill, stroke) = ((64.0 / 255.0, true, false), (191.0 / 255.0, false, true)); + for (show, want) in [("(A) Tj", vec![fill, stroke]), ("(A) Tj (B) Tj", vec![fill, stroke, fill, stroke])] { + let content = format!("/G gs 1 0 0 rg 0 0 1 RG 2 w BT /F1 20 Tf 2 Tr 1 0 0 1 10 20 Tm {show} 0 Tr ET"); + let d = import(&crate::tests::reader_compat::text_pdf(&content)).unwrap(); + let mut texts = vec![]; + d.walk(|n| { + if let NodeKind::Text(t) = &n.kind { + let st = t.first_style(); + texts.push((n.opacity, !st.fill.is_none(), !st.stroke.is_none())); + } + }); + assert_eq!(texts, want, "{content}"); + } +} + +/// Type filled and stroked at the same opacity below 1 stays a filled object and a stroked one: +/// the file composites the fill and the stroke apiece (darker where they overlap), while an +/// object's opacity applies to its fill and stroke together. Opaque, it is one object (#8015). +#[test] +fn translucent_fill_and_stroke_text_stays_two_objects() { + let half = |fill, stroke| (128.0 / 255.0, fill, stroke); + for show in ["(A) Tj", "(AB) Tj"] { + let content = format!("/G gs 1 0 0 rg 0 0 1 RG 2 w BT /F1 20 Tf 2 Tr 1 0 0 1 10 20 Tm {show} 0 Tr ET"); + for (state, want) in [("/ca 0.5 /CA 0.5", vec![half(true, false), half(false, true)]), ("/ca 1 /CA 1", vec![(1.0, true, true)])] { + let d = import(&crate::tests::reader_compat::text_pdf_with(state, &content)).unwrap(); + let mut texts = vec![]; + d.walk(|n| { + if let NodeKind::Text(t) = &n.kind { + let st = t.first_style(); + texts.push((n.opacity, !st.fill.is_none(), !st.stroke.is_none())); + } + }); + assert_eq!(texts, want, "{state}: {content}"); + } + } +} + +/// A stroke goes only over a glyph filled with the same text: "AB" filled, its "A" stroked, then +/// an "X" stroked where the "B" stands is type of its own, and the "B" stays unstroked (#8015). +#[test] +fn a_stroke_of_another_glyph_where_one_was_filled_stays_its_own_type() { + let content = "0 0 0 RG 1 1 0.8 rg 3 w BT /F1 60 Tf 1 0 0 1 40 110 Tm (AB) Tj 1 Tr 1 0 0 1 40 110 Tm (A) Tj (X) Tj 0 Tr ET"; + let want = [("A".to_string(), 60.0, true, true), ("B".to_string(), 60.0, true, false), ("X".to_string(), 60.0, false, true)]; + assert_eq!(word_runs(content), want, "{content}"); +} diff --git a/crates/text/src/tests/harakat.rs b/crates/text/src/tests/harakat.rs index 4e11921a6f..4281cf9a5d 100644 --- a/crates/text/src/tests/harakat.rs +++ b/crates/text/src/tests/harakat.rs @@ -454,18 +454,23 @@ fn check_spaced_harakat(db: &FontDb, family: &str) { } /// Right to left, with harakat coloured apart, Optical kerning keeps the Tsume of each letter's -/// cluster as it does in "HOH": the glyphs move as far with Optical kerning as without it. +/// cluster as it does in "HOH": the glyphs move as far with Optical kerning as without it. The test +/// font leaves blank space beside both letters' ink, so its Tsume must move something; an installed +/// face may not (#7821: Arial's initial beh and its fatha fill its cell), and there the Tsume takes +/// nothing, with or without Optical kerning. #[test] fn optical_kerning_keeps_the_tsume_of_a_letter_with_coloured_harakat() { let db = FontDb::with_font_dirs(vec![]); assert_eq!(db.add_font(crate::test_fonts::lam_alef_font(b"rlig").unwrap()), 1); - check_optical_tsume(&db, crate::test_fonts::lam_alef_family(b"rlig")); + check_optical_tsume(&db, crate::test_fonts::lam_alef_family(b"rlig"), true); if let Some(face) = arabic_face("optical_kerning_keeps_the_tsume_of_a_letter_with_coloured_harakat") { - check_optical_tsume(FontDb::global(), &face.family); + check_optical_tsume(FontDb::global(), &face.family, false); } } -fn check_optical_tsume(db: &FontDb, family: &str) { +/// `strict`: every letter's cluster must leave blank space beside its ink, so its Tsume must move +/// or narrow something. +fn check_optical_tsume(db: &FontDb, family: &str, strict: bool) { const WORD: &str = "بَبَ"; // ب 0, fatha 2, ب 4, fatha 6 let set = |optical: bool, letter: Option| { let mut t = text_with_harakat(WORD, family, Some(red())); @@ -479,11 +484,27 @@ fn check_optical_tsume(db: &FontDb, family: &str) { // Tsume of the line's first cluster only narrows its advance and moves no glyph. let xs = |t: &TextObject| layout(db, t).glyphs.iter().flat_map(|g| [g.xf.as_coeffs()[4], g.advance]).collect::>(); assert!(xs(&set(true, None)).iter().zip(xs(&set(false, None))).any(|(a, b)| (a - b).abs() > 1e-6), "{family}: Optical moves the pair"); + // The blank space Tsume shares out: between the letter's cluster's cell (from its glyphs' + // shared origin, as long as their advances) and its glyphs' ink, on each side, without Tsume. + let plain = layout(db, &set(false, None)); + let blank = |letter: usize| { + let cluster: Vec<_> = plain.glyphs.iter().filter(|g| g.byte == letter).collect(); + let start = cluster.iter().map(|g| g.origin.x).fold(f64::INFINITY, f64::min); + let end = start + cluster.iter().map(|g| g.advance).sum::(); + let ink = cluster.iter().filter(|g| !g.outline.elements().is_empty()).map(|g| g.outline.bounding_box()); + let (lo, hi) = ink.fold((f64::INFINITY, f64::NEG_INFINITY), |(lo, hi), b| (lo.min(b.x0), hi.max(b.x1))); + (lo - start).clamp(0.0, end - start) + (end - hi).clamp(0.0, end - start) + }; // Each letter in turn: the first one's cluster ends the pair, the second one's starts it. for letter in [0, 4] { let moved = |optical: bool| xs(&set(optical, Some(letter))).iter().zip(xs(&set(optical, None))).map(|(a, b)| a - b).collect::>(); let (without, with_optical) = (moved(false), moved(true)); - assert!(without.iter().any(|m| m.abs() > 1e-3), "{family} {letter}: Tsume moves or narrows the glyphs: {without:?}"); + let blank = blank(letter); + if strict || blank > 1e-6 { + assert!(without.iter().any(|m| m.abs() > 1e-6), "{family} {letter}: Tsume moves or narrows the glyphs ({blank} blank): {without:?}"); + } else { + assert!(without.iter().all(|m| m.abs() < 1e-6), "{family} {letter}: no blank space ({blank}), Tsume takes nothing: {without:?}"); + } assert!( without.len() == with_optical.len() && without.iter().zip(&with_optical).all(|(a, b)| (a - b).abs() < 1e-6), "{family} {letter}: {without:?} {with_optical:?}" diff --git a/crates/ui-egui/src/dialogs/print.rs b/crates/ui-egui/src/dialogs/print.rs index 017e669d9c..ebaad1749a 100644 --- a/crates/ui-egui/src/dialogs/print.rs +++ b/crates/ui-egui/src/dialogs/print.rs @@ -746,13 +746,19 @@ fn general(app: &VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) { let on = scaling == PrintScaling::Custom || tiles; let linked = get(d, SCALE_LINKED).as_bool() == Some(true); ui.label(tl!("W:")); - if let Some(w) = percent(ui, d, "scale.width", on).filter(|_| linked) { + let w = percent(ui, d, "scale.width", on); + if let Some(w) = w.filter(|_| linked) { set(d, "scale.height", json!(w)); } ui.label(tl!("H:")); - if let Some(h) = percent(ui, d, "scale.height", on).filter(|_| linked) { + let h = percent(ui, d, "scale.height", on); + if let Some(h) = h.filter(|_| linked) { set(d, "scale.width", json!(h)); } + // A typed W or H is what the next `ui.dialog.set` changes from. + if w.is_some() || h.is_some() { + see_scale(&mut d.fields); + } ui.add_enabled_ui(on, |ui| scale_link(ui, d, linked)); }); row(ui, tl!("Overlap:"), |ui| length(ui, d, "overlap", unit, tiles)); @@ -779,11 +785,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 +800,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 +834,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/save_for_web.rs b/crates/ui-egui/src/dialogs/save_for_web.rs index d6b5681cef..589d1dfdce 100644 --- a/crates/ui-egui/src/dialogs/save_for_web.rs +++ b/crates/ui-egui/src/dialogs/save_for_web.rs @@ -9,7 +9,10 @@ //! `ui.dialog.set`, or `preset` to load a preset), plus the dialog's own: `__view` (`original`, //! `optimized`, `2up`, `4up`), `__zoom` (`fit` or a percentage), `__kbps` (connection speed), //! `__color` (the colour table's selected colour, by source), `__presetName` (shown while saving a -//! preset) and `__hasSlices`. Save… remembers +//! preset) and `__hasSlices`. Optimize to File Size… (`__optimizeOpen: true`) shows `__optimizeK` (the desired size in K), +//! `__optimizeStart` (`current`, `auto`) and with slices `__optimizeUse` (`allSlices`, +//! `eachSlice`, `currentSlice`); `__optimizeGo: true` runs `webExport.optimizeToFileSize` and +//! takes the settings it finds, and `__optimized` holds its result. Save… remembers //! the settings and writes the files (`file.saveForWeb`); Done only remembers them; Preview in //! Browser opens the HTML page (`file.saveForWeb.browser`). While Alt (Option on macOS) is held, //! Cancel reads Reset, which puts the remembered settings back and leaves the dialog open @@ -71,6 +74,11 @@ const MATTES: [&str; 3] = ["none", "white", "black"]; const MATTE_LABELS: [&str; 4] = ["None", "White", "Black", "Other"]; /// JPEG quality steps: (label, quality). const QUALITIES: [(&str, u8); 5] = [("Low", 10), ("Medium", 30), ("High", 60), ("Very High", 80), ("Maximum", 100)]; +/// Optimize to File Size's Start With (`__optimizeStart`) and Use (`__optimizeUse`) choices. +const START_WITH: [(&str, &str); 2] = [("current", "Current Settings"), ("auto", "Auto Select GIF/JPEG")]; +const SIZE_USE: [(&str, &str); 3] = [("allSlices", "Total of All Slices"), ("eachSlice", "Each Slice"), ("currentSlice", "Current Slice")]; +/// The fields of Optimize to File Size's rows. +const OPTIMIZE_FIELDS: [&str; 3] = ["__optimizeK", "__optimizeStart", "__optimizeUse"]; /// Open on the document's active artboard, keeping the other remembered settings. pub fn open(app: &mut VectorcraftApp) -> Result { @@ -412,13 +420,11 @@ fn texture(ctx: &egui::Context, name: &str, px: &[u8], [w, h]: [u32; 2]) -> egui ctx.load_texture(name, img, opts) } -/// The rendering for `s` and the optimised image for each of `panes`, from the cache when nothing -/// they depend on changed. -fn previews(app: &VectorcraftApp, ctx: &egui::Context, s: &WebSettings, panes: &[WebSettings]) -> (Result, Vec>) { - let Some(st) = app.session.active() else { return (Err("no document".into()), vec![]) }; - let doc = &st.doc; - let mut cache: Cache = ctx.data(|m| m.get_temp(cache_id())).unwrap_or_default(); - let render_key = format!( +/// What the rendering for `s` depends on: the active document, its revision and the settings that +/// change the image's pixels. +fn render_key(app: &VectorcraftApp, s: &WebSettings) -> Option { + let st = app.session.active()?; + Some(format!( "{}:{}:{:?}:{:?}:{:?}:{}:{}:{:?}:{:?}", st.uid, st.revision, @@ -429,7 +435,15 @@ fn previews(app: &VectorcraftApp, ctx: &egui::Context, s: &WebSettings, panes: & s.clip_to_artboard, s.artboard, (!s.clip_to_artboard).then_some(s.slices) - ); + )) +} + +/// The rendering for `s` and the optimised image for each of `panes`, from the cache when nothing +/// they depend on changed. +fn previews(app: &VectorcraftApp, ctx: &egui::Context, s: &WebSettings, panes: &[WebSettings]) -> (Result, Vec>) { + let (Some(st), Some(render_key)) = (app.session.active(), render_key(app, s)) else { return (Err("no document".into()), vec![]) }; + let doc = &st.doc; + let mut cache: Cache = ctx.data(|m| m.get_temp(cache_id())).unwrap_or_default(); if cache.render_key != render_key || cache.render.is_none() { let r = webexport::render(doc, s).map(Arc::new); cache.original = r.as_ref().ok().map(|r| Shot { @@ -508,6 +522,14 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { if let Err(e) = apply_preset(app, d) { app.status(e); } + if d.fields.remove("__optimizeOpen").is_some_and(|v| v == json!(true)) { + open_optimize_rows(app, ui, d); + } + if d.fields.remove("__optimizeGo").is_some_and(|v| v == json!(true)) + && let Err(e) = optimize_to_size(app, d) + { + app.status(e); + } let settings = settings_of(app, d); let mut browser = false; ui.horizontal_top(|ui| { @@ -521,6 +543,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { side(app, ui, d, settings.as_ref().ok()); }); }); + optimize_on_enter(ui.ctx(), d); if browser && let Err(e) = app.run("file.saveForWeb.browser", params(d)) { app.status(e); } @@ -704,6 +727,7 @@ fn pairs(all: &[T], key: fn(T) -> &'static str, label: fn(T) -> &'stati fn side(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) { presets_row(app, ui, d, s); + optimize_rows(ui, d, s, &art_key(app)); widgets::divider(ui); egui::ScrollArea::vertical().id_salt("sfw-settings").max_height(PREVIEW_H - 40.0).auto_shrink([false, true]).show(ui, |ui| { let choice = |ui: &mut egui::Ui, d: &mut Dialog, key: &str, label: &str, options: &[(&str, &str)]| { @@ -805,6 +829,157 @@ fn presets_row(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, s: O } } +/// The optimized file size of the settings `s` on the active document as it is now: from the preview +/// cache when the cache holds that document at its current revision, else made through [`previews`], +/// which keeps the image for the preview drawn later in the same frame. +fn previewed_bytes(app: &VectorcraftApp, ui: &egui::Ui, s: &WebSettings) -> Option { + let key = s.to_json().to_string(); + let cache: Option = ui.ctx().data(|m| m.get_temp(cache_id())); + let cached = cache + .filter(|c| Some(&c.render_key) == render_key(app, s).as_ref()) + .and_then(|c| c.shots.into_iter().find(|(k, _)| *k == key)) + .and_then(|(_, shot)| shot.ok()) + .and_then(|shot| shot.bytes); + cached.or_else(|| previews(app, ui.ctx(), s, std::slice::from_ref(s)).1.into_iter().next()?.ok()?.bytes) +} + +/// Optimize to File Size…: the button opens rows ([`open_optimize_rows`]) for the desired size in +/// K, Start With and, with slices, Use; OK or Enter runs [`optimize_to_size`] and Cancel +/// closes the rows. A line gives the size it found and whether that is within the desired size +/// ([`optimized_result`]). +fn optimize_rows(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>, art: &str) { + if d.fields.contains_key("__optimizeK") { + widgets::label_row(ui, tl!("Desired File Size:"), LABEL_W, |ui| { + let k = d.f64("__optimizeK", 32.0); + if let Some(v) = widgets::range_field(ui, "sfw-optimize-k", k, 0.001..=webexport::MAX_DESIRED_K, "K", 3, 100.0) { + d.fields.insert("__optimizeK".into(), json!(v)); + } + }); + form::choice(ui, d, "__optimizeStart", tl!("Start With:"), (LABEL_W, FIELD_W), &START_WITH); + if d.bool("__hasSlices") { + form::choice(ui, d, "__optimizeUse", tl!("Use:"), (LABEL_W, FIELD_W), &SIZE_USE); + } + widgets::label_row(ui, "", LABEL_W, |ui| { + if widgets::flat_button(ui, tl!("OK"), 64.0).clicked() { + d.fields.insert("__optimizeGo".into(), json!(true)); + } + if widgets::flat_button(ui, tl!("Cancel"), 64.0).clicked() { + for k in OPTIMIZE_FIELDS { + d.fields.remove(k); + } + } + }); + } else { + widgets::label_row(ui, "", LABEL_W, |ui| { + if widgets::flat_button(ui, tl!("Optimize to File Size…"), FIELD_W).clicked() { + d.fields.insert("__optimizeOpen".into(), json!(true)); + } + }); + } + if let Some(r) = optimized_result(d, s, art) { + let size = size_label(r["bytes"].as_u64().unwrap_or(0) as usize); + let target = size_label(r["targetBytes"].as_u64().unwrap_or(0) as usize); + let text = if r["achieved"] == json!(true) { + crate::i18n::fmt(tl!("{size}, within {target}"), &[("size", &size), ("target", &target)]) + } else { + crate::i18n::fmt(tl!("No setting tried fits in {target}; the smallest is {size}"), &[("size", &size), ("target", &target)]) + }; + widgets::label_row(ui, "", LABEL_W, |ui| { + widgets::dim_label(ui, &text); + }); + } +} + +/// An Enter while the Optimize to File Size rows ([`optimize_rows`]) are open is their OK: it does +/// not save. Run after every control of the dialog has drawn, it runs the search unless a control +/// took the press (an open dropdown), a field refused the value typed in it, or Ctrl, Cmd or Alt was +/// held, which the size field does not commit. +pub(super) fn optimize_on_enter(ctx: &egui::Context, d: &mut Dialog) { + if !d.fields.contains_key("__optimizeK") || !crate::shortcuts::pressed_anew(ctx, egui::Key::Enter) { + return; + } + let held = ctx.input(|i| { + i.events.iter().any(|e| matches!(e, egui::Event::Key { key: egui::Key::Enter, pressed: true, modifiers, .. } if modifiers.ctrl || modifiers.command || modifiers.alt)) + }); + let refused = ctx.data(|m| m.get_temp::(widgets::dialog_reject_commit_flag())).unwrap_or(false); + widgets::reject_dialog_commit(ctx); + if !held && !refused { + d.fields.insert("__optimizeGo".into(), json!(true)); + ctx.request_repaint(); + } +} + +/// The last Optimize to File Size result (`__optimized`) while it still holds: the settings are the +/// ones it found and the art (`art`, from [`art_key`]) is the art it measured. +pub(super) fn optimized_result<'a>(d: &'a Dialog, s: Option<&WebSettings>, art: &str) -> Option<&'a Value> { + d.fields.get("__optimized").filter(|r| r["art"] == json!(art) && s.is_some_and(|s| r["settings"] == s.to_json())) +} + +/// The active document, its revision and its selected objects and slices, which an Optimize to File +/// Size result was measured on. The selection decides the slices Save writes with `slices: selected` +/// and the slice Current Slice measures, and a selection made on the canvas or with the Slice +/// Selection tool leaves the revision as it is. +pub(super) fn art_key(app: &VectorcraftApp) -> String { + app.session.active().map_or_else(String::new, |st| format!("{}:{}:{:?}:{:?}", st.uid, st.revision, st.selection.objects, st.selection.slices)) +} + +/// `bytes` in K, rounded up to the Desired File Size field's 0.001 K so the size it asks for holds +/// them. The product is taken in `u128`, which holds any `usize` times 1000 on every target. +pub(super) fn size_k(bytes: usize) -> f64 { + (bytes as u128 * 1000).div_ceil(1024).max(1) as f64 / 1000.0 +} + +/// Optimize to File Size… (`__optimizeOpen`): opens the rows with Current Settings and Total of All +/// Slices, the desired size starting at the size the current settings give what that Use measures: +/// the image slices' files together when there are slices, else the preview's file (32 K when it +/// cannot be measured). +fn open_optimize_rows(app: &mut VectorcraftApp, ui: &egui::Ui, d: &mut Dialog) { + let bytes = if d.bool("__hasSlices") { + let mut p = params(d); + if let Some(o) = p.as_object_mut() { + o.insert("desiredK".into(), json!(webexport::MAX_DESIRED_K)); + o.insert("use".into(), json!("allSlices")); + } + let r = app.run("webExport.optimizeToFileSize", p).ok(); + r.filter(|r| r["achieved"] == json!(true)).and_then(|r| r["bytes"].as_u64()).map(|b| b as usize) + } else { + settings_of(app, d).ok().and_then(|s| previewed_bytes(app, ui, &s)) + }; + let k = bytes.map_or(32.0, size_k); + d.fields.insert("__optimizeK".into(), json!(k)); + d.fields.insert("__optimizeStart".into(), json!("current")); + d.fields.insert("__optimizeUse".into(), json!("allSlices")); +} + +/// Optimize to File Size's OK: `webExport.optimizeToFileSize` with the dialog's settings and the +/// rows' values; the settings it finds replace the dialog's, the rows close and `__optimized` +/// keeps the result. An error leaves the settings and the rows as they are. +pub(super) fn optimize_to_size(app: &mut VectorcraftApp, d: &mut Dialog) -> Result { + let mut p = params(d); + if let Some(o) = p.as_object_mut() { + o.insert("desiredK".into(), d.fields.get("__optimizeK").cloned().unwrap_or(Value::Null)); + let start = d.str("__optimizeStart"); + if !start.is_empty() { + o.insert("startWith".into(), json!(start)); + } + let scope = d.str("__optimizeUse"); + if d.bool("__hasSlices") && !scope.is_empty() { + o.insert("use".into(), json!(scope)); + } + } + let r = app.run("webExport.optimizeToFileSize", p)?; + if let Some(found) = r["settings"].as_object() { + d.fields.extend(found.clone()); + } + for k in OPTIMIZE_FIELDS { + d.fields.remove(k); + } + let result = + json!({ "settings": r["settings"], "bytes": r["bytes"], "targetBytes": r["targetBytes"], "achieved": r["achieved"], "art": art_key(app) }); + d.fields.insert("__optimized".into(), result); + Ok(r) +} + /// Two checkboxes side by side. fn check_pair(ui: &mut egui::Ui, d: &mut Dialog, (a, a_label): (&str, &str), (b, b_label): (&str, &str)) { widgets::label_row(ui, "", LABEL_W, |ui| { diff --git a/crates/ui-egui/src/dialogs/tests_print.rs b/crates/ui-egui/src/dialogs/tests_print.rs index f1baabc1b9..cad38bb984 100644 --- a/crates/ui-egui/src/dialogs/tests_print.rs +++ b/crates/ui-egui/src/dialogs/tests_print.rs @@ -422,6 +422,54 @@ fn a_scale_set_through_the_dialog_keeps_the_percentage_it_changes() { assert_eq!(saved["scale"], json!({"width": 250.0, "height": 250.0, "linked": true})); } +/// An accessibility action on the node `target_node`. +fn request(action: egui::accesskit::Action, target_node: egui::accesskit::NodeId) -> egui::Event { + use egui::accesskit::{ActionRequest, TreeId}; + egui::Event::AccessKitActionRequest(ActionRequest { action, target_node, target_tree: TreeId::ROOT, data: None }) +} + +/// Type `typed` into Scale W, which shows `shown` (the first field that does, before H), and Tab out. +fn type_w(screen: &mut Screen, app: &mut VectorcraftApp, shown: &str, typed: &str) { + let key = |key, modifiers| egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers }; + screen.run(app, vec![]); + let out = screen.run(app, vec![]); + let nodes = &out.platform_output.accesskit_update.as_ref().expect("an accessibility tree").nodes; + let w = nodes.iter().find(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.value().is_some_and(|v| v.starts_with(shown))); + screen.run(app, vec![request(egui::accesskit::Action::Focus, w.expect("the Scale W field").0)]); + screen.run(app, vec![key(egui::Key::A, egui::Modifiers::COMMAND), egui::Event::Text(typed.into())]); + screen.run(app, vec![key(egui::Key::Tab, egui::Modifiers::NONE)]); +} + +#[test] +fn a_scale_set_after_a_typed_percentage_follows_the_link() { + let (mut app, _) = app(); + app.run("file.print", json!({})).unwrap(); + let mut screen = Screen::new(); + set(&mut app, "scaling", json!("custom")); + dialog(&mut app).fields["scale"]["width"] = json!(40); + screen.run(&mut app, vec![]); + assert_eq!(scale(&mut app), (40.0, 40.0, true)); + // W typed with the link on sets H as well. + type_w(&mut screen, &mut app, "40", "60"); + assert_eq!(scale(&mut app), (60.0, 60.0, true)); + // A new H set before the next frame: W follows it, and Done saves both. + dialog(&mut app).fields["scale"]["height"] = json!(50); + set(&mut app, "discard", json!(true)); + super::confirm(&mut app).unwrap(); + let saved = app.session.active().unwrap().doc.print_setup.clone().unwrap(); + assert_eq!(saved["scale"], json!({"width": 50.0, "height": 50.0, "linked": true})); + // W typed with the link off changes W alone; turning the link on then sets H to W. + app.run("file.print", json!({})).unwrap(); + let (link, _, _) = screen.link(&mut app); + screen.run(&mut app, vec![request(egui::accesskit::Action::Click, link)]); + assert_eq!(scale(&mut app), (50.0, 50.0, false)); + type_w(&mut screen, &mut app, "50", "70"); + assert_eq!(scale(&mut app), (70.0, 50.0, false)); + screen.run(&mut app, vec![request(egui::accesskit::Action::Click, link)]); + screen.run(&mut app, vec![]); + assert_eq!(scale(&mut app), (70.0, 70.0, true)); +} + #[test] fn the_dimmed_scale_link_ignores_the_keyboard() { use egui::accesskit::{Action, ActionRequest, TreeId}; @@ -440,3 +488,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/dialogs/tests_save_for_web.rs b/crates/ui-egui/src/dialogs/tests_save_for_web.rs index 9e92f57cdc..17c565e454 100644 --- a/crates/ui-egui/src/dialogs/tests_save_for_web.rs +++ b/crates/ui-egui/src/dialogs/tests_save_for_web.rs @@ -726,3 +726,192 @@ fn colour_table_buttons_edit_the_lists() { save_for_web::set_table(&mut d, "sort", json!("hue")); assert_eq!(d.fields["colorTable"], json!({"locked": [], "webShift": ["#123456"], "sort": "hue"})); } + +#[test] +fn optimize_to_file_size_takes_the_settings_that_fit() { + let dir = vectorcraft_testkit::temp_dir("sfw-optimize"); + let (mut app, _) = app(&dir, false); + app.run("file.saveForWeb", json!({})).unwrap(); + set(&mut app, "format", json!("jpg")); + set(&mut app, "quality", json!(100)); + frame(&mut app); + let full = app.session.execute("document.exportForWeb.preview", &json!({"format": "jpg", "quality": 100})).unwrap()["bytes"].as_u64().unwrap(); + let field = |app: &VectorcraftApp, k: &str| app.ui.dialog.as_ref().unwrap().fields.get(k).cloned(); + // A size of 0 is refused: the settings and the rows stay. + set(&mut app, "__optimizeK", json!(0)); + set(&mut app, "__optimizeStart", json!("current")); + set(&mut app, "__optimizeGo", json!(true)); + frame(&mut app); + assert_eq!(field(&app, "quality"), Some(json!(100))); + assert_eq!(field(&app, "__optimizeK"), Some(json!(0))); + assert_eq!((field(&app, "__optimized"), field(&app, "__optimizeGo")), (None, None)); + // OK takes the settings found and closes the rows. + set(&mut app, "__optimizeK", json!(full as f64 * 0.8 / 1024.0)); + set(&mut app, "__optimizeGo", json!(true)); + frame(&mut app); + let found = field(&app, "__optimized").unwrap(); + assert_eq!(found["achieved"], json!(true), "{found}"); + let quality = field(&app, "quality").unwrap().as_u64().unwrap(); + assert!(quality < 100, "{found}"); + assert_eq!(field(&app, "__optimizeK"), None); + // The result holds for the settings found on the art it measured. + let settings = app.session.web_settings(&found["settings"]).unwrap(); + let shown = |app: &VectorcraftApp| { + save_for_web::optimized_result(app.ui.dialog.as_ref().unwrap(), Some(&settings), &save_for_web::art_key(app)).is_some() + }; + assert!(shown(&app)); + // The result line draws, and Save writes the size found. + frame(&mut app); + let r = confirm(&mut app).unwrap(); + let written = std::fs::read(r["path"].as_str().unwrap()).unwrap(); + assert_eq!(written.len() as u64, found["bytes"].as_u64().unwrap()); + assert!(written.len() as u64 <= found["targetBytes"].as_u64().unwrap()); + assert_eq!(app.session.last_web_settings().quality as u64, quality); + // A change to the art drops the result. + app.run("file.saveForWeb", json!({})).unwrap(); + app.ui.dialog.as_mut().unwrap().fields.insert("__optimized".into(), found.clone()); + assert!(shown(&app)); + app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 5, "height": 5})).unwrap(); + assert!(!shown(&app)); + // So does a change to the selection, which decides the slices Save writes with `slices: selected`, + // also one that leaves the revision as it is (a click on the canvas). + let mut current = found.clone(); + current["art"] = json!(save_for_web::art_key(&app)); + app.ui.dialog.as_mut().unwrap().fields.insert("__optimized".into(), current); + assert!(shown(&app)); + let st = app.session.active_mut().unwrap(); + assert!(!st.selection.objects.is_empty()); + st.selection.objects.clear(); + assert!(!shown(&app)); + // And a change to the selected slices alone (the Slice Selection tool). + let mut current = found.clone(); + current["art"] = json!(save_for_web::art_key(&app)); + app.ui.dialog.as_mut().unwrap().fields.insert("__optimized".into(), current); + assert!(shown(&app)); + let st = app.session.active_mut().unwrap(); + let any = st.doc.layers[0].id; + st.selection.slices.push(any); + assert!(!shown(&app)); +} + +/// Enter while the Optimize to File Size rows are open runs the search and writes nothing; once the +/// search has closed the rows, Enter saves with the settings it found. +#[test] +fn enter_in_the_optimize_rows_runs_the_search_and_saves_nothing() { + let dir = vectorcraft_testkit::temp_dir("sfw-optimize-enter"); + let (mut app, _) = app(&dir, false); + app.run("file.saveForWeb", json!({})).unwrap(); + set(&mut app, "format", json!("jpg")); + set(&mut app, "quality", json!(100)); + frame(&mut app); + let full = app.session.execute("document.exportForWeb.preview", &json!({"format": "jpg", "quality": 100})).unwrap()["bytes"].as_u64().unwrap(); + set(&mut app, "__optimizeK", json!(full as f64 * 0.8 / 1024.0)); + set(&mut app, "__optimizeStart", json!("current")); + let files = |dir: &std::path::Path| std::fs::read_dir(dir).map_or(0, |r| r.count()); + let enter_with = |app: &mut VectorcraftApp, modifiers: egui::Modifiers| { + let key = egui::Event::Key { key: egui::Key::Enter, physical_key: None, pressed: true, repeat: false, modifiers }; + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + let mut out = ctx.run_ui(egui::RawInput { events: vec![key], ..Default::default() }, |ui| show(app, ui.ctx())); + out.textures_delta.clear(); + }; + let enter = |app: &mut VectorcraftApp| enter_with(app, egui::Modifiers::NONE); + // Ctrl+Enter, which the size field does not commit, neither searches nor saves. + enter_with(&mut app, egui::Modifiers::CTRL); + frame(&mut app); + assert_eq!(kind(&app), Some(save_for_web::KIND), "Ctrl+Enter in the rows does not save"); + assert!(app.ui.dialog.as_ref().unwrap().fields.contains_key("__optimizeK"), "the rows stay open"); + assert!(!app.ui.dialog.as_ref().unwrap().fields.contains_key("__optimized")); + assert_eq!(files(&dir), 0); + enter(&mut app); + assert_eq!(kind(&app), Some(save_for_web::KIND), "Enter in the rows does not save"); + assert_eq!(files(&dir), 0); + frame(&mut app); + let d = app.ui.dialog.as_ref().unwrap(); + let found = d.fields.get("__optimized").cloned().unwrap(); + assert_eq!(found["achieved"], json!(true), "{found}"); + assert!(!d.fields.contains_key("__optimizeK"), "the search closed the rows"); + enter(&mut app); + assert!(app.ui.dialog.is_none()); + assert_eq!(files(&dir), 1); +} + +/// An Enter in the Optimize to File Size rows runs no search when a field of the dialog, one drawn +/// after the rows included, refused the value typed in it on that press, or when a control drawn +/// after the rows (an open dropdown) took the press. +#[test] +fn enter_in_the_optimize_rows_runs_nothing_when_a_later_control_refused_or_took_it() { + // `before` stands for the controls drawn after the rows, which act on the press first. + let go = |before: fn(&egui::Context)| { + let mut d = Dialog::new(save_for_web::KIND, json!({"__optimizeK": 10})); + let key = egui::Event::Key { key: egui::Key::Enter, physical_key: None, pressed: true, repeat: false, modifiers: Default::default() }; + let ctx = egui::Context::default(); + let mut out = ctx.run_ui(egui::RawInput { events: vec![key], ..Default::default() }, |ui| { + before(ui.ctx()); + save_for_web::optimize_on_enter(ui.ctx(), &mut d); + }); + out.textures_delta.clear(); + assert!(d.fields.contains_key("__optimizeK"), "the rows stay open"); + d.fields.contains_key("__optimizeGo") + }; + assert!(go(|_| {}), "a plain Enter runs the search"); + assert!(!go(crate::widgets::reject_dialog_commit), "a refused value runs nothing"); + assert!(!go(|ctx| ctx.input_mut(|i| _ = i.consume_key(egui::Modifiers::NONE, egui::Key::Enter))), "a taken press runs nothing"); +} + +#[test] +fn optimize_to_file_size_starts_at_the_size_of_the_slices_files() { + let dir = vectorcraft_testkit::temp_dir("sfw-optimize-slices"); + let (mut app, _) = app(&dir, false); + app.run("object.slice.create", json!({"x": 0, "y": 0, "width": 30, "height": 20})).unwrap(); + app.run("file.saveForWeb", json!({})).unwrap(); + set(&mut app, "format", json!("png24")); + frame(&mut app); + let slices = app.session.execute("webExport.optimizeToFileSize", &json!({"format": "png24", "desiredK": 1048576})).unwrap(); + let whole = app.session.execute("document.exportForWeb.preview", &json!({"format": "png24"})).unwrap()["bytes"].as_u64().unwrap(); + let k = |b: u64| json!(save_for_web::size_k(b as usize)); + assert_ne!(k(slices["bytes"].as_u64().unwrap()), k(whole), "{slices}"); + // The size asked for holds the files measured. + let b = slices["bytes"].as_u64().unwrap(); + assert!((save_for_web::size_k(b as usize) * 1024.0).floor() as u64 >= b); + set(&mut app, "__optimizeOpen", json!(true)); + frame(&mut app); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!(d.fields.get("__optimizeK"), Some(&k(slices["bytes"].as_u64().unwrap()))); + assert_eq!((d.fields.get("__optimizeUse"), d.fields.get("__optimizeOpen")), (Some(&json!("allSlices")), None)); +} + +#[test] +fn optimize_to_file_size_starts_at_the_size_of_the_art_as_it_is_now() { + let dir = vectorcraft_testkit::temp_dir("sfw-optimize-revision"); + let (mut app, _) = app(&dir, false); + // One context for every frame, so the preview cache of the first frame is still there. + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + let frame = |app: &mut VectorcraftApp| ctx.run_ui(Default::default(), |ui| show(app, ui.ctx())).textures_delta.clear(); + app.run("file.saveForWeb", json!({})).unwrap(); + set(&mut app, "format", json!("png24")); + frame(&mut app); + let bytes = |app: &mut VectorcraftApp| { + app.session.execute("document.exportForWeb.preview", &json!({"format": "png24"})).unwrap()["bytes"].as_u64().unwrap() + }; + let before = bytes(&mut app); + // The art changes after the preview drew and before the button's click is handled. + app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 60, "height": 40})).unwrap(); + app.run("paint.setFill", json!({"color": "#3366ff"})).unwrap(); + let after = bytes(&mut app); + assert_ne!(save_for_web::size_k(before as usize), save_for_web::size_k(after as usize)); + set(&mut app, "__optimizeOpen", json!(true)); + frame(&mut app); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!(d.fields.get("__optimizeK"), Some(&json!(save_for_web::size_k(after as usize)))); +} + +#[test] +fn size_in_k_holds_sizes_past_4_mib_on_every_target() { + assert_eq!(save_for_web::size_k(5 * 1024 * 1024), 5120.0); + assert_eq!(save_for_web::size_k(0), 0.001); + assert_eq!(save_for_web::size_k(1), 0.001); + // The largest size a target can hold still rounds up to a size that holds it. + assert!(save_for_web::size_k(usize::MAX) * 1024.0 >= usize::MAX as f64 * 0.999); +} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index ce6b8393d0..aff35ecf0a 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -603,6 +603,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 Преобразуване на опорна точка @@ -2635,6 +2637,18 @@ font-technology Variable Променливи Preview: Преглед: Preview All Layers Преглед на всички слоеве Preview in Browser Преглед в браузър + Optimize to File Size… Оптимизиране до размер на файла… + Optimize to File Size Оптимизиране до размер на файла + Desired File Size: Желан размер на файла: + Start With: Начало с: + Use: Използване: + Current Settings Текущи настройки + Auto Select GIF/JPEG Автоматичен избор на GIF/JPEG + Total of All Slices Общо за всички откъси + Each Slice Всеки откъс + Current Slice Текущ откъс + {size}, within {target} {size}, в рамките на {target} + No setting tried fits in {target}; the smallest is {size} Никоя изпробвана настройка не се побира в {target}; най-малкият размер е {size} Preview in Browser needs the desktop app (the web downloads files instead) Прегледът в браузър изисква настолното приложение (уеб версията изтегля файловете вместо това) Preview Mode Режим на преглед Preview the document as it is now Преглед на документа в текущия му вид @@ -4376,6 +4390,11 @@ axis Both И двете @msg PDF writer error: {0} Грешка на PDF записа: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Пакетиран е {n} файл в {folder} ({note})|Пакетирани са {n} файла в {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Прегледът в браузър изисква настолното приложение (уеб версията изтегля файловете вместо това) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 задайте `desiredK`, желания размер на файла в K (1024 байта): число над 0 и най-много 1048576 +@msg `startWith` is `current` or `auto` `startWith` е `current` или `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` е `allSlices`, `eachSlice` или `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` е номер на откъс от `slice.list`, заедно с `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Оптимизиране до размер на файла: няма изображение за измерване @msg Release Guides: no guides Освобождаване на водачи: няма водачи @msg Release: no layer to put the rectangle in Освобождаване: няма слой, в който да се постави правоъгълникът @msg Replace Spine: select a blend and a path Замяна на оста: изберете плавно преливане и път diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index e29847cf46..52fc2c359a 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -1170,6 +1170,18 @@ lighting Light Svjetlo Placement Options… Opcije postavljanja… Plug-in… Dodatak… Preview in Browser Pregledaj u pregledniku + Optimize to File Size… Optimiziraj na veličinu datoteke… + Optimize to File Size Optimiziraj na veličinu datoteke + Desired File Size: Željena veličina datoteke: + Start With: Počni sa: + Use: Koristi: + Current Settings Trenutne postavke + Auto Select GIF/JPEG Automatski odaberi GIF/JPEG + Total of All Slices Ukupno svih isječaka + Each Slice Svaki isječak + Current Slice Trenutni isječak + {size}, within {target} {size}, unutar {target} + No setting tried fits in {target}; the smallest is {size} Nijedna isprobana postavka ne stane u {target}; najmanja je {size} Printer Setup… Podešavanje štampača… Printers Štampači Recent File Nedavna datoteka @@ -2844,6 +2856,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 @@ -4754,6 +4768,11 @@ imageTrace Outline Obris @msg PDF writer error: {0} greška PDF zapisivača: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Upakovano datoteka u {folder}: {n} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Pregledaj u pregledniku zahtijeva desktop aplikaciju (web umjesto toga preuzima datoteke) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 navedite `desiredK`, željenu veličinu datoteke u K (1024 bajta): broj veći od 0 i najviše 1048576 +@msg `startWith` is `current` or `auto` `startWith` je `current` ili `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` je `allSlices`, `eachSlice` ili `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` je broj isječka iz `slice.list`, uz `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimiziraj na veličinu datoteke: nema slike za mjerenje @msg Release Guides: no guides Oslobodi vodilice: nema vodilica @msg Release: no layer to put the rectangle in Oslobodi: nema sloja u koji bi se stavio pravougaonik @msg Replace Spine: select a blend and a path Zamijeni kičmu: odaberite stapanje i putanju diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 414acd524d..38ff106bbb 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -897,6 +897,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 @@ -3423,6 +3425,18 @@ digits Malayalam Malaiàlam Preview (1 inch on the page) Previsualització (1 polzada a la pàgina) Preview All Layers Previsualitza totes les capes Preview in Browser Previsualitza al navegador + Optimize to File Size… Optimitza segons la mida del fitxer… + Optimize to File Size Optimitza segons la mida del fitxer + Desired File Size: Mida de fitxer desitjada: + Start With: Comença amb: + Use: Utilitza: + Current Settings Configuració actual + Auto Select GIF/JPEG Selecció automàtica GIF/JPEG + Total of All Slices Total de tots els talls + Each Slice Cada tall + Current Slice Tall actual + {size}, within {target} {size}, dins de {target} + No setting tried fits in {target}; the smallest is {size} Cap configuració provada no cap a {target}; la més petita és {size} Preview in Browser needs the desktop app (the web downloads files instead) La previsualització al navegador necessita l’aplicació d’escriptori (al web, en canvi, es descarreguen els fitxers) Preview Mode Mode de previsualització Preview the document as it is now Previsualitza el document tal com és ara @@ -6326,6 +6340,11 @@ liquify-list-end {0}, {1} {0} i {1} @msg plug-in trapped: {0} el complement ha quedat atrapat: {0} @msg precision must be from 0.001 to 10 pt precision ha de ser d’entre 0,001 i 10 pt @msg Preview in Browser needs the desktop app (the web downloads files instead) La previsualització al navegador necessita l’aplicació d’escriptori (a la web es baixen els fitxers) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 indica `desiredK`, la mida de fitxer desitjada en K (1024 bytes): un nombre més gran que 0 i com a màxim 1048576 +@msg `startWith` is `current` or `auto` `startWith` és `current` o `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` és `allSlices`, `eachSlice` o `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` és un número de tall de `slice.list`, amb `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimitza segons la mida del fitxer: no hi ha cap imatge per mesurar @msg print settings are not an object la configuració d’impressió no és un objecte @msg printing isn't available here la impressió no està disponible aquí @msg range `{s}` is empty el rang `{s}` és buit diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 6fc18c8be6..9f601662a0 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1194,6 +1194,18 @@ lighting Light Světlo Placement Options… Možnosti umístění… Plug-in… Zásuvný modul… Preview in Browser Náhled v prohlížeči + Optimize to File Size… Optimalizovat na velikost souboru… + Optimize to File Size Optimalizovat na velikost souboru + Desired File Size: Požadovaná velikost souboru: + Start With: Začít s: + Use: Použít: + Current Settings Aktuální nastavení + Auto Select GIF/JPEG Automaticky vybrat GIF/JPEG + Total of All Slices Součet všech řezů + Each Slice Každý řez + Current Slice Aktuální řez + {size}, within {target} {size}, v rámci {target} + No setting tried fits in {target}; the smallest is {size} Žádné vyzkoušené nastavení se nevejde do {target}; nejmenší má {size} Printer Setup… Nastavení tiskárny… Printers Tiskárny Recent File Nedávný soubor @@ -2928,6 +2940,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í: @@ -5010,6 +5024,11 @@ liquify-list-end {0}, {1} {0} a {1} @msg PDF writer error: {0} chyba zápisu PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Zabalen {n} soubor do {folder} ({note})|Zabaleny {n} soubory do {folder} ({note})|Zabaleno {n} souborů do {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Náhled v prohlížeči vyžaduje desktopovou aplikaci (webová verze místo toho stahuje soubory) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 zadejte `desiredK`, požadovanou velikost souboru v K (1024 bajtů): číslo větší než 0 a nejvýše 1048576 +@msg `startWith` is `current` or `auto` `startWith` je `current` nebo `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` je `allSlices`, `eachSlice` nebo `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` je číslo řezu ze `slice.list`, s `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimalizovat na velikost souboru: není žádný obraz k měření @msg Release Guides: no guides Uvolnit vodítka: žádná vodítka @msg Release: no layer to put the rectangle in Uvolnit: chybí vrstva, do které by šel obdélník umístit @msg Replace Spine: select a blend and a path Nahradit páteř: vyberte prolnutí a cestu diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 25b300cba3..cfccae88c5 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -3791,6 +3791,18 @@ lighting Light Lys Placement Options… Placeringsindstillinger… Plug-in… Plug-in… Preview in Browser Forhåndsvis i browser + Optimize to File Size… Optimer til filstørrelse… + Optimize to File Size Optimer til filstørrelse + Desired File Size: Ønsket filstørrelse: + Start With: Start med: + Use: Brug: + Current Settings Aktuelle indstillinger + Auto Select GIF/JPEG Vælg GIF/JPEG automatisk + Total of All Slices Alle udsnit i alt + Each Slice Hvert udsnit + Current Slice Aktuelt udsnit + {size}, within {target} {size}, inden for {target} + No setting tried fits in {target}; the smallest is {size} Ingen afprøvet indstilling passer i {target}; den mindste er {size} Printer Setup… Printeropsætning… Printers Printere Recent File Seneste fil @@ -5396,6 +5408,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: @@ -7241,6 +7255,11 @@ imageTrace Outline Kontur @msg PDF writer error: {0} PDF-skriverfejl: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Pakkede {n} fil i {folder} ({note})|Pakkede {n} filer i {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Forhåndsvisning i browser kræver skrivebordsappen (webversionen downloader filer i stedet) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 angiv `desiredK`, den ønskede filstørrelse i K (1024 byte): et tal over 0 og højst 1048576 +@msg `startWith` is `current` or `auto` `startWith` er `current` eller `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` er `allSlices`, `eachSlice` eller `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` er et udsnitsnummer fra `slice.list`, med `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimer til filstørrelse: der er intet billede at måle @msg Release Guides: no guides Frigiv hjælpelinjer: ingen hjælpelinjer @msg Release: no layer to put the rectangle in Frigiv: intet lag at lægge rektanglet i @msg Replace Spine: select a blend and a path Erstat rygrad: markér en blanding og en kurve diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 7f51fd8ec8..7828ffd028 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -598,6 +598,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 @@ -2683,6 +2685,18 @@ diagnostics ui Oberfläche Preview: Vorschau: Preview All Layers Vorschau aller Ebenen Preview in Browser Vorschau im Browser + Optimize to File Size… Auf Dateigröße optimieren… + Optimize to File Size Auf Dateigröße optimieren + Desired File Size: Gewünschte Dateigröße: + Start With: Beginnen mit: + Use: Verwenden: + Current Settings Aktuelle Einstellungen + Auto Select GIF/JPEG GIF/JPEG automatisch wählen + Total of All Slices Summe aller Slices + Each Slice Jedes Slice + Current Slice Aktuelles Slice + {size}, within {target} {size}, innerhalb von {target} + No setting tried fits in {target}; the smallest is {size} Keine getestete Einstellung passt in {target}; die kleinste ist {size} Preview in Browser needs the desktop app (the web downloads files instead) „Vorschau im Browser“ erfordert die Desktop-App (im Web werden stattdessen Dateien heruntergeladen) Preview Mode Vorschaumodus Preview the document as it is now Vorschau des Dokuments im aktuellen Zustand @@ -4610,6 +4624,11 @@ liquify-list-end {0}, {1} {0} und {1} @msg PDF writer error: {0} Fehler beim Schreiben der PDF-Datei: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} {n} Datei in {folder} verpackt ({note})|{n} Dateien in {folder} verpackt ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) „Vorschau im Browser“ erfordert die Desktop-App (im Web werden stattdessen Dateien heruntergeladen) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 Geben Sie `desiredK` an, die gewünschte Dateigröße in K (1024 Byte): eine Zahl über 0 und höchstens 1048576 +@msg `startWith` is `current` or `auto` `startWith` ist `current` oder `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` ist `allSlices`, `eachSlice` oder `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` ist eine Slice-Nummer aus `slice.list`, mit `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Auf Dateigröße optimieren: Es gibt kein Bild zum Messen @msg Release Guides: no guides Hilfslinien zurückwandeln: keine Hilfslinien @msg Release: no layer to put the rectangle in Zurückwandeln: keine Ebene, die das Rechteck aufnehmen könnte @msg Replace Spine: select a blend and a path Achse ersetzen: Wählen Sie eine Angleichung und einen Pfad aus diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 77b71485bf..fa1e01bc18 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -577,6 +577,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 Μετατροπή σημείου αγκύρωσης @@ -2662,6 +2664,11 @@ liquify-list-end {0}, {1} {0} και {1} @msg PDF writer error: {0} Σφάλμα εγγραφής PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Συσκευάστηκε {n} αρχείο στον φάκελο {folder} ({note})|Συσκευάστηκαν {n} αρχεία στον φάκελο {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Η προεπισκόπηση σε πρόγραμμα περιήγησης απαιτεί την εφαρμογή υπολογιστή (η έκδοση ιστού πραγματοποιεί λήψη αρχείων) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 δώστε `desiredK`, το επιθυμητό μέγεθος αρχείου σε K (1024 byte): αριθμό πάνω από 0 και το πολύ 1048576 +@msg `startWith` is `current` or `auto` το `startWith` είναι `current` ή `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` το `use` είναι `allSlices`, `eachSlice` ή `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` το `slice` είναι αριθμός τομής από το `slice.list`, με `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Βελτιστοποίηση σε μέγεθος αρχείου: δεν υπάρχει εικόνα για μέτρηση @msg Release Guides: no guides Αποδέσμευση οδηγών: δεν υπάρχουν οδηγοί @msg Release: no layer to put the rectangle in Αποδέσμευση: δεν υπάρχει επίπεδο για να τοποθετηθεί το ορθογώνιο @msg Replace Spine: select a blend and a path Αντικατάσταση κεντρικής καμπύλης: επιλέξτε ανάμειξη και διαδρομή @@ -3571,6 +3578,18 @@ theme Appearance Εμφάνιση Presets you save with the Save Preset button appear here. Οι προεπιλογές που αποθηκεύετε με το κουμπί Αποθήκευση προεπιλογής εμφανίζονται εδώ. Preview All Layers Προεπισκόπηση όλων των επιπέδων Preview in Browser Προεπισκόπηση στο πρόγραμμα περιήγησης + Optimize to File Size… Βελτιστοποίηση σε μέγεθος αρχείου… + Optimize to File Size Βελτιστοποίηση σε μέγεθος αρχείου + Desired File Size: Επιθυμητό μέγεθος αρχείου: + Start With: Έναρξη με: + Use: Χρήση: + Current Settings Τρέχουσες ρυθμίσεις + Auto Select GIF/JPEG Αυτόματη επιλογή GIF/JPEG + Total of All Slices Σύνολο όλων των τομών + Each Slice Κάθε τομή + Current Slice Τρέχουσα τομή + {size}, within {target} {size}, εντός {target} + No setting tried fits in {target}; the smallest is {size} Καμία ρύθμιση που δοκιμάστηκε δεν χωρά σε {target}· η μικρότερη είναι {size} Preview in Browser needs the desktop app (the web downloads files instead) Η προεπισκόπηση στο πρόγραμμα περιήγησης απαιτεί την εφαρμογή υπολογιστή (στο web πραγματοποιείται λήψη αρχείων) Preview Mode Λειτουργία προεπισκόπησης Preview the document as it is now Προεπισκόπηση του εγγράφου στην τρέχουσα κατάστασή του diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 4480960a09..bfdc29e2ac 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -618,6 +618,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 @@ -2724,6 +2726,18 @@ font-technology Variable Variables Preview: Vista previa: Preview All Layers Previsualizar todas las capas Preview in Browser Previsualizar en el navegador + Optimize to File Size… Optimizar según tamaño de archivo… + Optimize to File Size Optimizar según tamaño de archivo + Desired File Size: Tamaño de archivo deseado: + Start With: Empezar con: + Use: Usar: + Current Settings Ajustes actuales + Auto Select GIF/JPEG Selección automática GIF/JPEG + Total of All Slices Total de todos los sectores + Each Slice Cada sector + Current Slice Sector actual + {size}, within {target} {size}, dentro de {target} + No setting tried fits in {target}; the smallest is {size} Ningún ajuste probado cabe en {target}; el menor es {size} Preview in Browser needs the desktop app (the web downloads files instead) Previsualizar en el navegador requiere la aplicación de escritorio (la versión web descarga los archivos) Preview Mode Modo de vista previa Preview the document as it is now Previsualizar el documento tal como está ahora @@ -4714,6 +4728,11 @@ liquify-list-end {0}, {1} {0}, {1} @msg PDF writer error: {0} error del escritor de PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Se empaquetó {n} archivo en {folder} ({note})|Se empaquetaron {n} archivos en {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Previsualizar en el navegador requiere la aplicación de escritorio (la versión web descarga los archivos) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 indica `desiredK`, el tamaño de archivo deseado en K (1024 bytes): un número mayor que 0 y como máximo 1048576 +@msg `startWith` is `current` or `auto` `startWith` es `current` o `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` es `allSlices`, `eachSlice` o `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` es un número de sector de `slice.list`, con `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimizar según tamaño de archivo: no hay ninguna imagen que medir @msg Release Guides: no guides Soltar guías: no hay guías @msg Release: no layer to put the rectangle in Soltar: no hay ninguna capa donde poner el rectángulo @msg Replace Spine: select a blend and a path Reemplazar eje: selecciona una fusión y un trazado diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index e2de80dc71..689639acfa 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1172,6 +1172,18 @@ lighting Light Valo Placement Options… Sijoitusasetukset… Plug-in… Laajennus… Preview in Browser Esikatsele selaimessa + Optimize to File Size… Optimoi tiedostokokoon… + Optimize to File Size Optimoi tiedostokokoon + Desired File Size: Haluttu tiedostokoko: + Start With: Aloita: + Use: Käytä: + Current Settings Nykyiset asetukset + Auto Select GIF/JPEG Valitse GIF/JPEG automaattisesti + Total of All Slices Kaikki siivut yhteensä + Each Slice Jokainen siivu + Current Slice Nykyinen siivu + {size}, within {target} {size}, enintään {target} + No setting tried fits in {target}; the smallest is {size} Mikään kokeiltu asetus ei mahdu kokoon {target}; pienin on {size} Printer Setup… Tulostimen asetukset… Printers Tulostimet Recent File Viimeisin tiedosto @@ -2872,6 +2884,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: @@ -4947,6 +4961,11 @@ liquify-list-end {0}, {1} {0} ja {1} @msg PDF writer error: {0} PDF-kirjoittimen virhe: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Paketoitiin {n} tiedosto kansioon {folder} ({note})|Paketoitiin {n} tiedostoa kansioon {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Esikatselu selaimessa vaatii työpöytäsovelluksen (verkkoversio lataa tiedostot sen sijaan) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 anna `desiredK`, haluttu tiedostokoko yksikössä K (1024 tavua): luku, joka on yli 0 ja enintään 1048576 +@msg `startWith` is `current` or `auto` `startWith` on `current` tai `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` on `allSlices`, `eachSlice` tai `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` on siivun numero luettelosta `slice.list`, kun `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimoi tiedostokokoon: mitattavaa kuvaa ei ole @msg Release Guides: no guides Vapauta apuviivat: ei apuviivoja @msg Release: no layer to put the rectangle in Vapauta: ei tasoa, johon suorakulmion voisi sijoittaa @msg Replace Spine: select a blend and a path Korvaa selkäranka: valitse sulautus ja polku diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 54f9e7ca04..62dbf50d8f 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -619,6 +619,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 @@ -2712,6 +2714,18 @@ font-technology Variable Variables Preview: Aperçu : Preview All Layers Aperçu de tous les calques Preview in Browser Aperçu dans le navigateur + Optimize to File Size… Optimiser selon la taille du fichier… + Optimize to File Size Optimiser selon la taille du fichier + Desired File Size: Taille de fichier souhaitée : + Start With: Commencer par : + Use: Utiliser : + Current Settings Réglages actuels + Auto Select GIF/JPEG Sélection automatique GIF/JPEG + Total of All Slices Total de toutes les tranches + Each Slice Chaque tranche + Current Slice Tranche active + {size}, within {target} {size}, dans la limite de {target} + No setting tried fits in {target}; the smallest is {size} Aucun réglage essayé ne tient dans {target}, le plus petit fait {size} Preview in Browser needs the desktop app (the web downloads files instead) L’aperçu dans le navigateur nécessite l’application de bureau (la version web télécharge les fichiers à la place) Preview Mode Mode Aperçu Preview the document as it is now Afficher un aperçu du document dans son état actuel @@ -4676,6 +4690,11 @@ liquify-list-end {0}, {1} {0} et {1} @msg PDF writer error: {0} Erreur du générateur PDF : {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} {n} fichier assemblé dans {folder} ({note})|{n} fichiers assemblés dans {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Aperçu dans le navigateur nécessite l’application de bureau (la version web télécharge les fichiers à la place) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 indiquez `desiredK`, la taille de fichier souhaitée en K (1024 octets), un nombre supérieur à 0 et au plus 1048576 +@msg `startWith` is `current` or `auto` `startWith` vaut `current` ou `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` vaut `allSlices`, `eachSlice` ou `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` est un numéro de tranche de `slice.list`, avec `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimiser selon la taille du fichier, aucune image à mesurer @msg Release Guides: no guides Annuler les repères : aucun repère @msg Release: no layer to put the rectangle in Annuler : aucun calque où placer le rectangle @msg Replace Spine: select a blend and a path Remplacer la dorsale : sélectionnez un dégradé de formes et un tracé diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index df8dee1dc9..8804ea911d 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -724,6 +724,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 એન્કર પોઇન્ટ રૂપાંતર કરો @@ -2799,6 +2801,18 @@ Preview All Layers બધા લેયરનું પૂર્વાવલોકન Preview Mode પૂર્વાવલોકન મોડ Preview in Browser બ્રાઉઝરમાં પૂર્વાવલોકન + Optimize to File Size… ફાઇલ કદ મુજબ ઑપ્ટિમાઇઝ કરો… + Optimize to File Size ફાઇલ કદ મુજબ ઑપ્ટિમાઇઝ કરો + Desired File Size: ઇચ્છિત ફાઇલ કદ: + Start With: શરૂઆત: + Use: ઉપયોગ: + Current Settings વર્તમાન સેટિંગ્સ + Auto Select GIF/JPEG GIF/JPEG આપમેળે પસંદ કરો + Total of All Slices બધી સ્લાઇસનો કુલ + Each Slice દરેક સ્લાઇસ + Current Slice વર્તમાન સ્લાઇસ + {size}, within {target} {size}, {target} ની અંદર + No setting tried fits in {target}; the smallest is {size} અજમાવેલી કોઈ સેટિંગ {target} માં સમાતી નથી; સૌથી નાની {size} છે Preview the document as it is now અત્યારે જેમ છે તેમ દસ્તાવેજનું પૂર્વાવલોકન કરો Previous પાછલું Previous Artboard પાછલું આર્ટબોર્ડ diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 8206f2ef46..5b1a7ba069 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -1034,6 +1034,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 एंकर पॉइंट कनवर्ट करें @@ -3759,6 +3761,18 @@ antiAlias Sharp शार्प Preview (1 inch on the page) प्रीव्यू (1 इंच पृष्ठ पर) Preview All Layers सभी लेयर्स का प्रीव्यू करें Preview in Browser ब्राउज़र में प्रीव्यू + Optimize to File Size… फ़ाइल आकार के अनुसार ऑप्टिमाइज़ करें… + Optimize to File Size फ़ाइल आकार के अनुसार ऑप्टिमाइज़ करें + Desired File Size: वांछित फ़ाइल आकार: + Start With: शुरुआत: + Use: उपयोग: + Current Settings वर्तमान सेटिंग्स + Auto Select GIF/JPEG GIF/JPEG स्वचालित रूप से चुनें + Total of All Slices सभी स्लाइस का कुल + Each Slice प्रत्येक स्लाइस + Current Slice वर्तमान स्लाइस + {size}, within {target} {size}, {target} के भीतर + No setting tried fits in {target}; the smallest is {size} आज़माई गई कोई भी सेटिंग {target} में नहीं समाती; सबसे छोटा {size} है Preview in Browser needs the desktop app (the web downloads files instead) ब्राउज़र में प्रीव्यू डेस्कटॉप ऐप (वेब डाउनलोड फ़ाइलों के बजाय) की जरूरत है Preview Mode प्रीव्यू मोड Preview the document as it is now डॉक्यूमेंट का प्रीव्यू करें क्योंकि यह अब है @@ -8050,6 +8064,11 @@ liquify-list-end {0}, {1} {0} और {1} @msg preset must be standard, diffuse, topLeft or right preset को standard, diffuse, topLeft या right होना चाहिए @msg preset must be the name of a print preset preset किसी प्रिंट प्रीसेट का नाम होना चाहिए @msg Preview in Browser needs the desktop app (the web downloads files instead) ब्राउज़र में प्रीव्यू डेस्कटॉप ऐप (वेब डाउनलोड फ़ाइलों के बजाय) की जरूरत है +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 `desiredK` दें, K (1024 बाइट) में वांछित फ़ाइल आकार: 0 से बड़ी और अधिकतम 1048576 संख्या +@msg `startWith` is `current` or `auto` `startWith` का मान `current` या `auto` होना चाहिए +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` का मान `allSlices`, `eachSlice` या `currentSlice` होना चाहिए +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice`, `slice.list` से स्लाइस संख्या है, `use: currentSlice` के साथ +@msg Optimize to File Size: there is no image to measure फ़ाइल आकार के अनुसार ऑप्टिमाइज़ करें: मापने के लिए कोई इमेज नहीं है @msg previewMode must be default, pixel or overprint previewMode को default, pixel या overprint होना चाहिए @msg Print Ink Fixes works on CMYK documents: choose File › Document Color Mode › CMYK Color first प्रिंट इंक फिक्स CMYK डॉक्यूमेंट्स पर काम करता है: फ़ाइल चुनें › डॉक्यूमेंट रंग मोड › CMYK कलर फर्स्ट @msg print settings are not an object प्रिंट सेटिंग एक ऑब्जेक्ट नहीं है diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index d2eadcb1bb..6377a47496 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -811,6 +811,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 @@ -3285,6 +3287,18 @@ diagnostics ui felület Preview: Előnézet: Preview All Layers Összes réteg előnézetben Preview in Browser Előnézet böngészőben + Optimize to File Size… Optimalizálás fájlméretre… + Optimize to File Size Optimalizálás fájlméretre + Desired File Size: Kívánt fájlméret: + Start With: Kiindulás: + Use: Használat: + Current Settings Jelenlegi beállítások + Auto Select GIF/JPEG GIF/JPEG automatikus kiválasztása + Total of All Slices Az összes szelet együtt + Each Slice Minden szelet + Current Slice Aktuális szelet + {size}, within {target} {size}, belefér ebbe: {target} + No setting tried fits in {target}; the smallest is {size} Egyik kipróbált beállítás sem fér bele ebbe: {target}; a legkisebb {size} Preview in Browser needs the desktop app (the web downloads files instead) Az Előnézet böngészőben az asztali alkalmazásban érhető el (a webes változat helyette letölti a fájlokat) Preview Mode Előnézeti mód Preview the document as it is now A dokumentum jelenlegi állapotának előnézete @@ -5833,6 +5847,11 @@ liquify-list-end {0}, {1} {0} és {1} @msg plug-in parameters: {0} bővítmény paraméterei: {0} @msg plug-in trapped: {0} a bővítmény futása megszakadt: {0} @msg Preview in Browser needs the desktop app (the web downloads files instead) Az Előnézet böngészőben az asztali alkalmazásban érhető el (a webes változat helyette letölti a fájlokat) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 adja meg a `desiredK` értéket, a kívánt fájlméretet K-ban (1024 bájt): 0-nál nagyobb, legfeljebb 1048576 szám +@msg `startWith` is `current` or `auto` a `startWith` értéke `current` vagy `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` a `use` értéke `allSlices`, `eachSlice` vagy `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` a `slice` egy szeletszám a `slice.list` listából, `use: currentSlice` mellett +@msg Optimize to File Size: there is no image to measure Optimalizálás fájlméretre: nincs mérhető kép @msg print settings are not an object a nyomtatási beállítások nem objektumot alkotnak @msg printing isn't available here itt nem lehet nyomtatni @msg range `{s}` is empty a tartomány üres: `{s}` diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index d853517ac7..b5c578c207 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1097,6 +1097,18 @@ lighting Light Cahaya Placement Options… Opsi penempatan… Plug-in… Plug-in… Preview in Browser Pratinjau di browser + Optimize to File Size… Optimalkan ke Ukuran File… + Optimize to File Size Optimalkan ke Ukuran File + Desired File Size: Ukuran File yang Diinginkan: + Start With: Mulai Dengan: + Use: Gunakan: + Current Settings Pengaturan Saat Ini + Auto Select GIF/JPEG Pilih Otomatis GIF/JPEG + Total of All Slices Total Semua Slice + Each Slice Setiap Slice + Current Slice Slice Saat Ini + {size}, within {target} {size}, dalam batas {target} + No setting tried fits in {target}; the smallest is {size} Tidak ada pengaturan yang dicoba yang muat dalam {target}; yang terkecil {size} Printer Setup… Pengaturan printer… Printers Printer Recent File File terbaru @@ -2653,6 +2665,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: @@ -4497,6 +4511,11 @@ imageTrace Outline Kontur @msg PDF writer error: {0} Kesalahan penulis PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Berhasil mengemas {n} file di {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Pratinjau di Peramban memerlukan aplikasi desktop (versi web mengunduh file sebagai gantinya) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 berikan `desiredK`, ukuran file yang diinginkan dalam K (1024 byte): angka di atas 0 dan paling banyak 1048576 +@msg `startWith` is `current` or `auto` `startWith` adalah `current` atau `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` adalah `allSlices`, `eachSlice` atau `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` adalah nomor slice dari `slice.list`, dengan `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimalkan ke Ukuran File: tidak ada gambar untuk diukur @msg Release Guides: no guides Lepaskan panduan: tidak ada panduan @msg Release: no layer to put the rectangle in Lepaskan: tidak ada lapisan untuk menaruh persegi panjangnya @msg Replace Spine: select a blend and a path Ganti rangka: pilih satu blend dan satu jalur diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 64f9be841d..46ee88e7bc 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -620,6 +620,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 @@ -2764,6 +2766,18 @@ diagnostics ui interfaccia Preview: Anteprima: Preview All Layers Anteprima di tutti i livelli Preview in Browser Anteprima nel browser + Optimize to File Size… Ottimizza in base alle dimensioni del file… + Optimize to File Size Ottimizza in base alle dimensioni del file + Desired File Size: Dimensione file desiderata: + Start With: Inizia con: + Use: Usa: + Current Settings Impostazioni correnti + Auto Select GIF/JPEG Selezione automatica GIF/JPEG + Total of All Slices Totale di tutte le sezioni + Each Slice Ogni sezione + Current Slice Sezione corrente + {size}, within {target} {size}, entro {target} + No setting tried fits in {target}; the smallest is {size} Nessuna impostazione provata rientra in {target}; la più piccola è {size} Preview in Browser needs the desktop app (the web downloads files instead) Anteprima nel browser richiede l'app desktop (la versione web scarica invece i file) Preview Mode Modalità anteprima Preview the document as it is now Visualizza l'anteprima del documento nello stato attuale @@ -4744,6 +4758,11 @@ liquify-list-end {0}, {1} {0} e {1} @msg PDF writer error: {0} Errore del generatore PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Pacchetto creato con {n} file in {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Anteprima nel browser richiede l'app desktop (sul web i file vengono invece scaricati) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 indica `desiredK`, la dimensione del file desiderata in K (1024 byte): un numero maggiore di 0 e al massimo 1048576 +@msg `startWith` is `current` or `auto` `startWith` è `current` o `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` è `allSlices`, `eachSlice` o `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` è un numero di sezione da `slice.list`, con `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Ottimizza in base alle dimensioni del file: non c'è nessuna immagine da misurare @msg Release Guides: no guides Rilascia guide: nessuna guida @msg Release: no layer to put the rectangle in Rilascia: nessun livello in cui inserire il rettangolo @msg Replace Spine: select a blend and a path Sostituisci dorsale: seleziona una fusione e un tracciato diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index b0921d97f6..0e660dfd2b 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1379,6 +1379,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 アンカーポイントの切り替え @@ -2838,6 +2840,18 @@ diagnostics ui UI Preview All Layers すべてのレイヤーをプレビュー Preview Mode プレビューモード Preview in Browser ブラウザーでプレビュー + Optimize to File Size… ファイルサイズに合わせて最適化… + Optimize to File Size ファイルサイズに合わせて最適化 + Desired File Size: 目標ファイルサイズ: + Start With: 開始設定: + Use: 対象: + Current Settings 現在の設定 + Auto Select GIF/JPEG GIF/JPEG を自動選択 + Total of All Slices すべてのスライスの合計 + Each Slice 各スライス + Current Slice 現在のスライス + {size}, within {target} {size} ({target} 以内) + No setting tried fits in {target}; the smallest is {size} 試したどの設定も {target} に収まりません。最小は {size} Preview the document as it is now 現在のドキュメントをプレビュー Previous 前へ Previous Library 前のライブラリ @@ -5185,6 +5199,11 @@ swatch Bright Violet ビビッドバイオレット @msg 1 hidden object 非表示のオブジェクト 1 個 @msg {n} hidden objects 非表示のオブジェクト {n} 個 @msg Preview in Browser needs the desktop app (the web downloads files instead) 「ブラウザーでプレビュー」にはデスクトップアプリが必要です (Web 版では代わりにファイルをダウンロードします) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 `desiredK` に目標ファイルサイズを K (1024 バイト) 単位で指定してください: 0 より大きく 1048576 以下の数値 +@msg `startWith` is `current` or `auto` `startWith` は `current` または `auto` です +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` は `allSlices`、`eachSlice` または `currentSlice` です +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` は `slice.list` のスライス番号で、`use: currentSlice` と一緒に使います +@msg Optimize to File Size: there is no image to measure ファイルサイズに合わせて最適化: 測定する画像がありません @msg no file system here この環境にはファイルシステムがありません @msg nothing to preview プレビューするものがありません @msg Saved {n} files beside {path} {path} と同じ場所にファイルを {n} 個保存しました diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 1ffbee6b9c..2f18259342 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -3262,6 +3262,18 @@ lighting Light სინათლე Placement Options… განთავსების პარამეტრები… Plug-in… პლაგინი… Preview in Browser ბრაუზერში ნახვა + Optimize to File Size… ფაილის ზომაზე ოპტიმიზაცია… + Optimize to File Size ფაილის ზომაზე ოპტიმიზაცია + Desired File Size: სასურველი ფაილის ზომა: + Start With: დაწყება: + Use: გამოყენება: + Current Settings მიმდინარე პარამეტრები + Auto Select GIF/JPEG GIF/JPEG-ის ავტომატური არჩევა + Total of All Slices ყველა ნაჭრის ჯამი + Each Slice თითოეული ნაჭერი + Current Slice მიმდინარე ნაჭერი + {size}, within {target} {size}, {target}-ის ფარგლებში + No setting tried fits in {target}; the smallest is {size} არცერთი ნაცადი პარამეტრი არ ეტევა {target}-ში; უმცირესია {size} Printer Setup… პრინტერის დაყენება… Printers პრინტერები Recent File ბოლოს გახსნილი ფაილი @@ -4825,6 +4837,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: ჩამოტვირთვა: @@ -6548,6 +6562,11 @@ font-technology Variable ცვლადი @msg PDF writer error: {0} PDF-ის ჩამწერის შეცდომა: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} შეფუთულია ფაილი ({n}) საქაღალდეში {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) ბრაუზერში წინასწარ ნახვას დესკტოპის აპი სჭირდება (ვებში ფაილები ჩამოიტვირთება) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 მიუთითეთ `desiredK`, სასურველი ფაილის ზომა K-ში (1024 ბაიტი): 0-ზე მეტი და არაუმეტეს 1048576 რიცხვი +@msg `startWith` is `current` or `auto` `startWith` არის `current` ან `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` არის `allSlices`, `eachSlice` ან `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` არის ნაჭრის ნომერი `slice.list`-დან, `use: currentSlice`-თან ერთად +@msg Optimize to File Size: there is no image to measure ფაილის ზომაზე ოპტიმიზაცია: გასაზომი გამოსახულება არ არის @msg Release Guides: no guides დამხმარე ხაზების მოხსნა: დამხმარე ხაზები არ არის @msg Release: no layer to put the rectangle in მოხსნა: მართკუთხედის ჩასასმელი შრე არ არის @msg Replace Spine: select a blend and a path ხერხემლის ჩანაცვლება: მონიშნეთ გადასვლა და ტრაექტორია diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 04cd391076..2ca45a9766 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1369,6 +1369,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 앵커 포인트 변환 @@ -2828,6 +2830,18 @@ diagnostics ui UI Preview All Layers 모든 레이어 미리 보기 Preview Mode 미리 보기 모드 Preview in Browser 브라우저에서 미리 보기 + Optimize to File Size… 파일 크기에 맞게 최적화… + Optimize to File Size 파일 크기에 맞게 최적화 + Desired File Size: 원하는 파일 크기: + Start With: 시작 설정: + Use: 사용: + Current Settings 현재 설정 + Auto Select GIF/JPEG GIF/JPEG 자동 선택 + Total of All Slices 모든 분할 합계 + Each Slice 각 분할 + Current Slice 현재 분할 + {size}, within {target} {size}, {target} 이내 + No setting tried fits in {target}; the smallest is {size} 시도한 설정 중 {target}에 맞는 것이 없습니다. 가장 작은 크기는 {size} Preview the document as it is now 문서를 현재 상태로 미리 보기 Previous 이전 Previous Library 이전 라이브러리 @@ -5112,6 +5126,11 @@ theme Appearance 외관 @msg 1 hidden object 숨겨진 개체 1개 @msg {n} hidden objects 숨겨진 개체 {n}개 @msg Preview in Browser needs the desktop app (the web downloads files instead) 브라우저에서 미리 보기는 데스크톱 앱이 필요합니다(웹에서는 파일을 다운로드합니다) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 `desiredK`에 원하는 파일 크기를 K(1024바이트) 단위로 지정하세요: 0보다 크고 1048576 이하인 숫자 +@msg `startWith` is `current` or `auto` `startWith`는 `current` 또는 `auto`입니다 +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use`는 `allSlices`, `eachSlice` 또는 `currentSlice`입니다 +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice`는 `slice.list`의 분할 번호이며 `use: currentSlice`와 함께 씁니다 +@msg Optimize to File Size: there is no image to measure 파일 크기에 맞게 최적화: 측정할 이미지가 없습니다 @msg no file system here 여기에는 파일 시스템이 없습니다 @msg nothing to preview 미리 볼 항목이 없습니다 @msg Saved {n} files beside {path} {path} 옆에 파일 {n}개를 저장했습니다 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 0128913acd..a17e83bfaf 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1665,6 +1665,18 @@ lighting Light Licht Placement Options… Plaatsingsopties… Plug-in… Plug-in… Preview in Browser Voorbeeld in browser + Optimize to File Size… Optimaliseren naar bestandsgrootte… + Optimize to File Size Optimaliseren naar bestandsgrootte + Desired File Size: Gewenste bestandsgrootte: + Start With: Beginnen met: + Use: Gebruiken: + Current Settings Huidige instellingen + Auto Select GIF/JPEG GIF/JPEG automatisch kiezen + Total of All Slices Totaal van alle slices + Each Slice Elke slice + Current Slice Huidige slice + {size}, within {target} {size}, binnen {target} + No setting tried fits in {target}; the smallest is {size} Geen geprobeerde instelling past in {target}; de kleinste is {size} Printer Setup… Printerinstellingen… Printers Printers Recent File Recent bestand @@ -3270,6 +3282,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: @@ -5116,6 +5130,11 @@ imageTrace Outline Contour @msg PDF writer error: {0} PDF-schrijffout: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} {n} bestand verpakt in {folder} ({note})|{n} bestanden verpakt in {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Voorvertoning in browser heeft de desktop-app nodig (het web downloadt in plaats daarvan bestanden) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 geef `desiredK`, de gewenste bestandsgrootte in K (1024 bytes): een getal boven 0 en hoogstens 1048576 +@msg `startWith` is `current` or `auto` `startWith` is `current` of `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` is `allSlices`, `eachSlice` of `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` is een slicenummer uit `slice.list`, met `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimaliseren naar bestandsgrootte: er is geen afbeelding om te meten @msg Release Guides: no guides Hulplijnen vrijgeven: geen hulplijnen @msg Release: no layer to put the rectangle in Vrijgeven: geen laag om de rechthoek in te plaatsen @msg Replace Spine: select a blend and a path Ruggengraat vervangen: selecteer een mengsel en een pad diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 684d565870..cb545353e2 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1130,6 +1130,18 @@ lighting Light Światło Placement Options… Opcje umieszczania… Plug-in… Wtyczka… Preview in Browser Podgląd w przeglądarce + Optimize to File Size… Optymalizuj do rozmiaru pliku… + Optimize to File Size Optymalizuj do rozmiaru pliku + Desired File Size: Żądany rozmiar pliku: + Start With: Zacznij od: + Use: Użyj: + Current Settings Bieżące ustawienia + Auto Select GIF/JPEG Automatyczny wybór GIF/JPEG + Total of All Slices Suma wszystkich plasterków + Each Slice Każdy plasterek + Current Slice Bieżący plasterek + {size}, within {target} {size}, w granicach {target} + No setting tried fits in {target}; the smallest is {size} Żadne wypróbowane ustawienie nie mieści się w {target}; najmniejsze ma {size} Printer Setup… Ustawienia drukarki… Printers Drukarki Recent File Ostatni plik @@ -2841,6 +2853,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: @@ -4833,6 +4847,11 @@ liquify-list-end {0}, {1} {0} i {1} @msg PDF writer error: {0} Błąd zapisu PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Spakowane pliki: {n} w {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Podgląd w przeglądarce wymaga aplikacji desktopowej (wersja webowa zamiast tego pobiera pliki) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 podaj `desiredK`, żądany rozmiar pliku w K (1024 bajty): liczbę większą od 0 i najwyżej 1048576 +@msg `startWith` is `current` or `auto` `startWith` to `current` lub `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` to `allSlices`, `eachSlice` lub `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` to numer plasterka z `slice.list`, z `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optymalizuj do rozmiaru pliku: brak obrazu do zmierzenia @msg Release Guides: no guides Uwolnij linie pomocnicze: brak linii pomocniczych @msg Release: no layer to put the rectangle in Uwolnij: brak warstwy, na której można umieścić prostokąt @msg Replace Spine: select a blend and a path Zastąp grzbiet: zaznacz przejście i ścieżkę diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index ed5140abe4..580e066295 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -562,6 +562,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 @@ -2253,6 +2255,18 @@ antiAlias Sharp Nítido Preview: Visualização: Preview Mode Modo de Visualização Preview in Browser Visualizar no Navegador + Optimize to File Size… Otimizar para tamanho de arquivo… + Optimize to File Size Otimizar para tamanho de arquivo + Desired File Size: Tamanho de arquivo desejado: + Start With: Começar com: + Use: Usar: + Current Settings Configurações atuais + Auto Select GIF/JPEG Seleção automática GIF/JPEG + Total of All Slices Total de todas as fatias + Each Slice Cada fatia + Current Slice Fatia atual + {size}, within {target} {size}, dentro de {target} + No setting tried fits in {target}; the smallest is {size} Nenhuma configuração testada cabe em {target}; a menor tem {size} Preview the document as it is now Visualizar o documento como está agora Previous Anterior Previous Library Biblioteca Anterior @@ -4029,6 +4043,11 @@ axis Both Ambos @msg PDF writer error: {0} Erro do gravador de PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} {n} arquivo empacotado em {folder} ({note})|{n} arquivos empacotados em {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Visualizar no navegador exige o aplicativo para desktop (na web, os arquivos são baixados) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 informe `desiredK`, o tamanho de arquivo desejado em K (1024 bytes): um número acima de 0 e no máximo 1048576 +@msg `startWith` is `current` or `auto` `startWith` é `current` ou `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` é `allSlices`, `eachSlice` ou `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` é um número de fatia de `slice.list`, com `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Otimizar para tamanho de arquivo: não há imagem para medir @msg Release Guides: no guides Liberar guias: não há guias @msg Release: no layer to put the rectangle in Liberar: não há camada para colocar o retângulo @msg Replace Spine: select a blend and a path Substituir coluna: selecione uma mesclagem e um traçado diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index e78dc74a02..b1cfe5c162 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -616,6 +616,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 Преобразовать опорную точку @@ -2751,6 +2753,18 @@ diagnostics ui интерфейс Preview: Просмотр: Preview All Layers Просмотреть все слои Preview in Browser Просмотреть в браузере + Optimize to File Size… Оптимизировать по размеру файла… + Optimize to File Size Оптимизировать по размеру файла + Desired File Size: Желаемый размер файла: + Start With: Начать с: + Use: Использовать: + Current Settings Текущие настройки + Auto Select GIF/JPEG Автовыбор GIF/JPEG + Total of All Slices Сумма всех фрагментов + Each Slice Каждый фрагмент + Current Slice Текущий фрагмент + {size}, within {target} {size}, в пределах {target} + No setting tried fits in {target}; the smallest is {size} Ни одна опробованная настройка не укладывается в {target}; наименьший размер {size} Preview in Browser needs the desktop app (the web downloads files instead) Просмотр в браузере требует настольного приложения (web-версия скачивает файлы) Preview Mode Режим просмотра Preview the document as it is now Просмотреть документ в текущем виде @@ -4738,6 +4752,11 @@ liquify-list-end {0}, {1} {0} и {1} @msg PDF writer error: {0} ошибка записи PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Упаковано файлов: {n} в {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Просмотр в браузере требует настольного приложения (web-версия скачивает файлы) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 укажите `desiredK`, желаемый размер файла в K (1024 байта): число больше 0 и не больше 1048576 +@msg `startWith` is `current` or `auto` `startWith` принимает значения `current` или `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` принимает значения `allSlices`, `eachSlice` или `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` задаёт номер фрагмента из `slice.list`, вместе с `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Оптимизировать по размеру файла: нет изображения для измерения @msg Release Guides: no guides Освобождение направляющих: нет направляющих @msg Release: no layer to put the rectangle in Освобождение: нет слоя для помещения прямоугольника @msg Replace Spine: select a blend and a path Замена остова: выделите переход и контур diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 86fcfac9ee..729201ff83 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -605,6 +605,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 @@ -2655,6 +2657,18 @@ font-technology Variable Variabla Preview: Förhandsgranskning: Preview All Layers Förhandsgranska alla lager Preview in Browser Förhandsgranska i webbläsare + Optimize to File Size… Optimera till filstorlek… + Optimize to File Size Optimera till filstorlek + Desired File Size: Önskad filstorlek: + Start With: Börja med: + Use: Använd: + Current Settings Aktuella inställningar + Auto Select GIF/JPEG Välj GIF/JPEG automatiskt + Total of All Slices Alla skivor totalt + Each Slice Varje skiva + Current Slice Aktuell skiva + {size}, within {target} {size}, inom {target} + No setting tried fits in {target}; the smallest is {size} Ingen provad inställning ryms i {target}; den minsta är {size} Preview in Browser needs the desktop app (the web downloads files instead) Förhandsgranska i webbläsare kräver skrivbordsappen (webbversionen hämtar filerna i stället) Preview Mode Förhandsgranskningsläge Preview the document as it is now Förhandsgranska dokumentet som det ser ut nu @@ -4620,6 +4634,11 @@ liquify-list-end {0}, {1} {0} och {1} @msg PDF writer error: {0} fel i PDF-skrivaren: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Paketerade {n} fil i {folder} ({note})|Paketerade {n} filer i {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Förhandsgranska i webbläsare kräver skrivbordsappen (webbversionen hämtar filer i stället) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 ange `desiredK`, önskad filstorlek i K (1024 byte): ett tal över 0 och högst 1048576 +@msg `startWith` is `current` or `auto` `startWith` är `current` eller `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` är `allSlices`, `eachSlice` eller `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` är ett skivnummer från `slice.list`, med `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Optimera till filstorlek: det finns ingen bild att mäta @msg Release Guides: no guides Släpp stödlinjer: inga stödlinjer @msg Release: no layer to put the rectangle in Släpp: inget lager att placera rektangeln i @msg Replace Spine: select a blend and a path Ersätt ryggrad: markera en blandning och en bana diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 84dd5c82ee..a31436c343 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -597,6 +597,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 @@ -2496,6 +2498,18 @@ shape Open Açık Preview: Önizleme: Preview All Layers Tüm Katmanları Önizle Preview in Browser Tarayıcıda Önizleme + Optimize to File Size… Dosya Boyutuna Göre Optimize Et… + Optimize to File Size Dosya Boyutuna Göre Optimize Et + Desired File Size: İstenen Dosya Boyutu: + Start With: Başlangıç: + Use: Kullan: + Current Settings Geçerli Ayarlar + Auto Select GIF/JPEG GIF/JPEG Otomatik Seç + Total of All Slices Tüm Dilimlerin Toplamı + Each Slice Her Dilim + Current Slice Geçerli Dilim + {size}, within {target} {size}, {target} sınırında + No setting tried fits in {target}; the smallest is {size} Denenen hiçbir ayar {target} içine sığmıyor; en küçüğü {size} Preview in Browser needs the desktop app (the web downloads files instead) Tarayıcıdaki önizleme için masaüstü uygulaması gerekir (bunun yerine web, dosyaları indirir) Preview Mode Önizleme Modu Preview the document as it is now Belgeyi şu anki haliyle önizleyin @@ -4453,6 +4467,11 @@ liquify-list-end {0}, {1} {0} ve {1} @msg PDF writer error: {0} PDF yazıcı hatası: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} {n} dosya {folder} klasörüne paketlendi ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Tarayıcıdaki önizleme için masaüstü uygulaması gerekir (bunun yerine web, dosyaları indirir) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 `desiredK` değerini verin, K cinsinden istenen dosya boyutu (1024 bayt): 0'dan büyük ve en çok 1048576 olan bir sayı +@msg `startWith` is `current` or `auto` `startWith` değeri `current` veya `auto` olmalıdır +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` değeri `allSlices`, `eachSlice` veya `currentSlice` olmalıdır +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice`, `slice.list` içindeki bir dilim numarasıdır ve `use: currentSlice` ile kullanılır +@msg Optimize to File Size: there is no image to measure Dosya Boyutuna Göre Optimize Et: ölçülecek görüntü yok @msg Release Guides: no guides Sürüm Kılavuzları: kılavuz yok @msg Release: no layer to put the rectangle in Serbest bırakma: dikdörtgeni yerleştirecek katman yok @msg Replace Spine: select a blend and a path Omurgayı Değiştir: bir karışım ve yol seçin diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 1b7ce525a9..09abde7f9f 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -614,6 +614,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 Перетворити опорну точку @@ -2756,6 +2758,18 @@ diagnostics ui інтерфейс Preview: Перегляд: Preview All Layers Переглянути всі шари Preview in Browser Переглянути у браузері + Optimize to File Size… Оптимізувати за розміром файлу… + Optimize to File Size Оптимізувати за розміром файлу + Desired File Size: Бажаний розмір файлу: + Start With: Почати з: + Use: Використати: + Current Settings Поточні налаштування + Auto Select GIF/JPEG Автовибір GIF/JPEG + Total of All Slices Сума всіх фрагментів + Each Slice Кожен фрагмент + Current Slice Поточний фрагмент + {size}, within {target} {size}, у межах {target} + No setting tried fits in {target}; the smallest is {size} Жодне випробуване налаштування не вміщується в {target}; найменший розмір {size} Preview in Browser needs the desktop app (the web downloads files instead) Перегляд у браузері вимагає настільної програми (web-версія завантажує файли) Preview Mode Режим перегляду Preview the document as it is now Переглянути документ у поточному вигляді @@ -4728,6 +4742,11 @@ liquify-list-end {0}, {1} {0} і {1} @msg PDF writer error: {0} Помилка запису PDF: {0} @msgplural Packaged {n} file ({note}) in {folder}|Packaged {n} files ({note}) in {folder} Упаковано файли: {n} {folder} ({note}) @msg Preview in Browser needs the desktop app (the web downloads files instead) Перегляд у браузері вимагає настільної програми (web-версія завантажує файли) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 укажіть `desiredK`, бажаний розмір файлу в K (1024 байти): число більше за 0 і не більше 1048576 +@msg `startWith` is `current` or `auto` `startWith` має значення `current` або `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` має значення `allSlices`, `eachSlice` або `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` задає номер фрагмента зі `slice.list`, разом з `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Оптимізувати за розміром файлу: немає зображення для вимірювання @msg Release Guides: no guides Звільнення напрямних: немає напрямних @msg Release: no layer to put the rectangle in Звільнення: немає шару для приміщення прямокутника @msg Replace Spine: select a blend and a path Заміна осі: виділіть перехід і контур diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index a3873198a7..c97ff53e87 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -717,6 +717,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 @@ -3078,6 +3080,18 @@ diagnostics ui giao diện Preview: Xem trước: Preview All Layers Xem trước tất cả lớp Preview in Browser Xem trước trong trình duyệt + Optimize to File Size… Tối ưu theo kích thước tệp… + Optimize to File Size Tối ưu theo kích thước tệp + Desired File Size: Kích thước tệp mong muốn: + Start With: Bắt đầu với: + Use: Dùng: + Current Settings Cài đặt hiện tại + Auto Select GIF/JPEG Tự chọn GIF/JPEG + Total of All Slices Tổng tất cả lát cắt + Each Slice Mỗi lát cắt + Current Slice Lát cắt hiện tại + {size}, within {target} {size}, trong giới hạn {target} + No setting tried fits in {target}; the smallest is {size} Không cài đặt nào đã thử vừa với {target}; nhỏ nhất là {size} Preview in Browser needs the desktop app (the web downloads files instead) Xem trước trong trình duyệt cần ứng dụng máy tính để bàn (web sẽ tải tệp xuống thay thế) Preview Mode Chế độ xem trước Preview the document as it is now Xem trước tài liệu như hiện tại @@ -5521,6 +5535,11 @@ liquify-list-end {0}, {1} {0} và {1} @msg plug-in parameters: {0} tham số plug-in: {0} @msg plug-in trapped: {0} plug-in bị kẹt: {0} @msg Preview in Browser needs the desktop app (the web downloads files instead) Xem trước trên trình duyệt cần ứng dụng máy tính (web sẽ tải xuống tệp thay thế) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 hãy cho `desiredK`, kích thước tệp mong muốn tính bằng K (1024 byte): một số lớn hơn 0 và tối đa 1048576 +@msg `startWith` is `current` or `auto` `startWith` là `current` hoặc `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` là `allSlices`, `eachSlice` hoặc `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` là số lát cắt từ `slice.list`, đi cùng `use: currentSlice` +@msg Optimize to File Size: there is no image to measure Tối ưu theo kích thước tệp: không có ảnh để đo @msg print settings are not an object cài đặt in không phải là đối tượng @msg printing isn't available here in không khả dụng ở đây @msg range `{s}` is empty phạm vi `{s}` trống diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 9ec168eb22..7f2f421c5e 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -565,6 +565,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 转换锚点 @@ -2615,6 +2617,18 @@ diagnostics ui 界面 Preview 预览 Preview: 预览: Preview in Browser 在浏览器中预览 + Optimize to File Size… 优化到文件大小… + Optimize to File Size 优化到文件大小 + Desired File Size: 所需文件大小: + Start With: 起始设置: + Use: 使用: + Current Settings 当前设置 + Auto Select GIF/JPEG 自动选择 GIF/JPEG + Total of All Slices 所有切片总计 + Each Slice 每个切片 + Current Slice 当前切片 + {size}, within {target} {size},不超过 {target} + No setting tried fits in {target}; the smallest is {size} 尝试过的设置都无法小于 {target};最小为 {size} Preview in Browser needs the desktop app (the web downloads files instead) 在浏览器中预览需要桌面版应用程序 (网页版会改为下载文件) Preview Mode 预览模式 Preview the document as it is now 按当前状态预览文档 @@ -4866,6 +4880,11 @@ imageTrace Outline 轮廓 @msg 1 hidden object 1 个隐藏的对象 @msg {n} hidden objects {n} 个隐藏的对象 @msg Preview in Browser needs the desktop app (the web downloads files instead) “在浏览器中预览”需要桌面应用 (网页版会改为下载文件) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 请给出 `desiredK`,即以 K (1024 字节) 为单位的所需文件大小:大于 0 且不超过 1048576 的数字 +@msg `startWith` is `current` or `auto` `startWith` 为 `current` 或 `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` 为 `allSlices`、`eachSlice` 或 `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` 是 `slice.list` 中的切片编号,需配合 `use: currentSlice` +@msg Optimize to File Size: there is no image to measure 优化到文件大小:没有可测量的图像 @msg no file system here 此处没有文件系统 @msg nothing to preview 没有可预览的内容 @msg Saved {n} files beside {path} 已在 {path} 旁保存 {n} 个文件 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index b35e435234..79252dd3be 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -582,6 +582,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 轉換錨點 @@ -2455,6 +2457,11 @@ file-filter Templates 範本 @msg 1 hidden object 1 個隱藏的物件 @msg {n} hidden objects {n} 個隱藏的物件 @msg Preview in Browser needs the desktop app (the web downloads files instead) 「在瀏覽器中預覽」需要桌面應用程式 (網頁版會改為下載檔案) +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 請提供 `desiredK`,即以 K (1024 位元組) 為單位的所需檔案大小:大於 0 且不超過 1048576 的數字 +@msg `startWith` is `current` or `auto` `startWith` 為 `current` 或 `auto` +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` 為 `allSlices`、`eachSlice` 或 `currentSlice` +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` 是 `slice.list` 中的切片編號,需搭配 `use: currentSlice` +@msg Optimize to File Size: there is no image to measure 最佳化至檔案大小:沒有可測量的影像 @msg no file system here 此處沒有檔案系統 @msg nothing to preview 沒有可預覽的內容 @msg Saved {n} files beside {path} 已在 {path} 旁儲存 {n} 個檔案 @@ -3891,6 +3898,18 @@ diagnostics ui 介面 Preview: 預覽: Preview All Layers 預覽所有圖層 Preview in Browser 在瀏覽器中預覽 + Optimize to File Size… 最佳化至檔案大小… + Optimize to File Size 最佳化至檔案大小 + Desired File Size: 所需檔案大小: + Start With: 起始設定: + Use: 使用: + Current Settings 目前設定 + Auto Select GIF/JPEG 自動選取 GIF/JPEG + Total of All Slices 所有切片總計 + Each Slice 每個切片 + Current Slice 目前切片 + {size}, within {target} {size},不超過 {target} + No setting tried fits in {target}; the smallest is {size} 嘗試過的設定都無法小於 {target};最小為 {size} Preview in Browser needs the desktop app (the web downloads files instead) 在瀏覽器中預覽需要桌面版應用程式 (網頁版會改為下載檔案) Preview Mode 預覽模式 Preview the document as it is now 以目前狀態預覽文件 diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rs index ed122d35de..7b70844dcc 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/file-format-parity.md b/docs/file-format-parity.md index 0cc9985a9c..8239848e91 100644 --- a/docs/file-format-parity.md +++ b/docs/file-format-parity.md @@ -1,6 +1,6 @@ # File format parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, not butt caps and miter joins, #7741; `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; `.ai` and EPS import: a top-object envelope whose mesh saves its sides' curves in pieces draws its contents along each whole curve, as its drawn art does, #7097; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: `.ai` and EPS import: type from the text document, type a PostScript program sets and legacy `.ai` type are set in an installed face of their font's PostScript name, exact name first, in the version a text document's record keeps; the `.ai` save writes a static font's version when its name alone gives another copy, #6983; `.ai` and EPS import: type keeps the manual kerning of its text document, #6899; `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, its strokes' miter tips and strokes a Transform effect moves included, after its glyphs grown by half its strokes' weight, #6824; `.ai` and EPS import: type filled or stroked with a pattern swatch keeps its pattern, from the art style its text document paint names, #6856; #6865: explicitly requested oversized editing artboard; PDF import: Indic type keeps its marks on their line, and a line whose type would not draw as the file does keeps the file's glyphs as outlines, #5235; previously: newly imported SVG/SVGZ titles are filtered and bounded without changing restored titles, #3626; `.ai` and EPS import, and what every export and `.ai` save draw: type's strokes in an envelope paint at their own weight along its bent outlines, Distort Appearance on or off, #6644; `.ai` and EPS import: centred and right-aligned lines of tracked type are aligned without the tracking after their last character, as the file's page aligns them, #6610; `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art, #6570; `.ai` save and open: layer colour presets Yellow, Magenta and Cyan keep their colour, as the `Lb` colour index now follows the file's numbering, #6502; `.ai` save: stroked type keeps its stroke's cap, join and miter limit in the text document, #6472; `.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke, #3179; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature the page names by a private-use glyph matches its text object; EPS import: CIDFonts only named, over a Unicode CMap, set as live type; EPS import: CMap mappings to base-font codes and glyph names; EPS import: CID-keyed fonts in FontSets (CFF) draw their glyphs; EPS import: `kshow` procedures kern live type; EPS import: embedded Type 1 fonts' glyphs and widths; EPS import: CID-keyed fonts draw their glyphs; EPS import: Type 42 fonts' characters and widths from the font they carry, show operators' spacing kept as tracking; EPS import: an image decoder's own buffers stop counting against the memory budget once it is decoded; EPS import: sampled functions interpolate between their samples; `.ai` and EPS type from the text document keeps its tab stops; it keeps auto leading and hyphenation options, and may show more of the file's last lines in an area frame; `.ai` and EPS import: Art brushes in the older form of their objects come into the Brushes panel; EPS import: gradients drawn as abutting strips come in as one gradient, without seams; EPS import: composite fonts draw their Type 42 glyphs; SVG import: filter and mask regions clip, #5876, #5875; SVG import: Gaussian blurs keep `color-interpolation-filters`, #5877; PDF and `.ai` export: objects' URLs as links, #5785; SVG import: `color-interpolation="linearRGB"` gradients, #5878; `.ai` import: paths with a Calligraphic brush open brushed, #372) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; scores and estimates unchanged; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, not butt caps and miter joins, #7741; `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; `.ai` and EPS import: a top-object envelope whose mesh saves its sides' curves in pieces draws its contents along each whole curve, as its drawn art does, #7097; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: `.ai` and EPS import: type from the text document, type a PostScript program sets and legacy `.ai` type are set in an installed face of their font's PostScript name, exact name first, in the version a text document's record keeps; the `.ai` save writes a static font's version when its name alone gives another copy, #6983; `.ai` and EPS import: type keeps the manual kerning of its text document, #6899; `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, its strokes' miter tips and strokes a Transform effect moves included, after its glyphs grown by half its strokes' weight, #6824; `.ai` and EPS import: type filled or stroked with a pattern swatch keeps its pattern, from the art style its text document paint names, #6856; #6865: explicitly requested oversized editing artboard; PDF import: Indic type keeps its marks on their line, and a line whose type would not draw as the file does keeps the file's glyphs as outlines, #5235; previously: newly imported SVG/SVGZ titles are filtered and bounded without changing restored titles, #3626; `.ai` and EPS import, and what every export and `.ai` save draw: type's strokes in an envelope paint at their own weight along its bent outlines, Distort Appearance on or off, #6644; `.ai` and EPS import: centred and right-aligned lines of tracked type are aligned without the tracking after their last character, as the file's page aligns them, #6610; `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art, #6570; `.ai` save and open: layer colour presets Yellow, Magenta and Cyan keep their colour, as the `Lb` colour index now follows the file's numbering, #6502; `.ai` save: stroked type keeps its stroke's cap, join and miter limit in the text document, #6472; `.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke, #3179; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature the page names by a private-use glyph matches its text object; EPS import: CIDFonts only named, over a Unicode CMap, set as live type; EPS import: CMap mappings to base-font codes and glyph names; EPS import: CID-keyed fonts in FontSets (CFF) draw their glyphs; EPS import: `kshow` procedures kern live type; EPS import: embedded Type 1 fonts' glyphs and widths; EPS import: CID-keyed fonts draw their glyphs; EPS import: Type 42 fonts' characters and widths from the font they carry, show operators' spacing kept as tracking; EPS import: an image decoder's own buffers stop counting against the memory budget once it is decoded; EPS import: sampled functions interpolate between their samples; `.ai` and EPS type from the text document keeps its tab stops; it keeps auto leading and hyphenation options, and may show more of the file's last lines in an area frame; `.ai` and EPS import: Art brushes in the older form of their objects come into the Brushes panel; EPS import: gradients drawn as abutting strips come in as one gradient, without seams; EPS import: composite fonts draw their Type 42 glyphs; SVG import: filter and mask regions clip, #5876, #5875; SVG import: Gaussian blurs keep `color-interpolation-filters`, #5877; PDF and `.ai` export: objects' URLs as links, #5785; SVG import: `color-interpolation="linearRGB"` gradients, #5878; `.ai` import: paths with a Calligraphic brush open brushed, #372) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). @@ -350,6 +350,8 @@ Stop opacity on translated artboards remains outside this regression coverage. - [ ] Exact redistribution of one replacement over several lines/styles, and general mixed-direction paragraph layout. Replacement uses the first placed glyph's line/style. Tags deeper than 128 and replacements over 64 KiB encoded (at most 192 KiB decoded) fall back to glyph mappings with a warning; an outer accepted owner survives deeper tags. - [x] Stroked type (text rendering modes 1, 2, 5 and 6, with or without `ActualText`) keeps the line cap, line join and miter limit of the graphics state it is stroked with, as paths do; glyphs stroked with another cap, join or miter limit are a run of their own, also a glyph filled and then stroked otherwise than the run its fill joined (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`). The dash array is not carried to the characters yet. +- [x] Type filled and stroked by one text-showing operator (text rendering modes 2 and 6: the reader fills all of a `Tj` or `TJ`, every string of the array, before it strokes the same glyphs) comes in as one type object, filled and stroked, as it does glyph by glyph; a stroke over no filled glyph (modes 1 and 5, or stroked type of its own) stays stroke only (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Translucent type filled and stroked stays a filled object and a stroked one, as the file composites them apiece (`translucent_fill_and_stroke_text_stays_two_objects`). +- [ ] PDF type filled and stroked at less than full opacity as one type object, and a `TJ` whose kerning starts a new line part way through, filled and stroked: both still come in as a filled object and a stroked one (#8015). - [x] Place from bytes or unlinked paths, and PDF clipboard paste, keep the selected page's live text. Synthetic two-page regressions in `crates/engine/src/cmd/fileio/tests_pdffidelity.rs` cover both sources, page selection and explicit outlines. The single-page importer honors the same text choice as Open; existing PDF fallback rules are unchanged. @@ -361,6 +363,8 @@ Stop opacity on translated artboards remains outside this regression coverage. | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | +| 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | | 2026-11-15 | minor | PDF import: stroked type (text rendering modes 1, 2, 5 and 6, and glyphs under `ActualText`) came in with butt caps, miter joins and a miter limit of 10 whatever the file stroked it with, while paths kept the graphics state's. The characters' stroke now takes the line cap (`J`), line join (`j`) and miter limit (`M`) of the graphics state, as a path's stroke does, and glyphs stroked with other ones start a run of their own, also a glyph filled and then stroked otherwise than the run its fill joined, so the glyphs before it keep their stroke (#7741). Test `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`. Scores and estimates unchanged. | | 2026-11-13 | minor | `.ai` and EPS import: layers that don't draw as the page, even with the drawn art of every live envelope put back, no longer put back the drawn art of every envelope of type. Each live envelope of type is weighed in the page check's own drawing of the pages it lies on, on the pixels that it and its drawn art ink there (the two drawn together on a layer of their own, without the rest of the layers; a pixel inks with an alpha above 8 of 255): it keeps its drawn art and its type, hidden, with the note, where the layers with it differ from the page in more of those pixels than its own check allows against its drawn art (10% of them, or 3% differing with all their neighbours, away from type), or where the envelopes of type that stay live, in the order they were read, would together differ there in more of a page than half of what the page check allows (a budget of the same size as the one their own checks share, kept apart from it). Art that differs elsewhere on the page no longer costs them their editable type; art that differs on their pixels still does. An envelope of type that a clip group or a clipping sublayer clips, an opacity mask masks, or a group with an appearance of its own, another envelope, a repeat or a blend holds keeps its drawn art as before, wherever it lies: drawn on its own it would be weighed elsewhere than it draws, and what holds it can draw it onto the page from off it. An envelope on no page stays live, as the page check doesn't see it, unless the page holds all the art that prints (an EPS's page that is its art's box, where art past the page is compared too): there one reaching past the page keeps its drawn art. Past 12 of them on the pages, all keep it. This holds where the editing data is trusted, where the objects that differ come in as the page's art (the placed files' other placement weighed on its own, as it draws them elsewhere under or over the envelopes; layers that draw as the page with only the envelopes the page holds put back are used as they are; where none of the objects that differ can then come in as the page's art, because an object holds type, the drawn art of every envelope of type is put back and that is tried again, as before), and for a `.ai` whose layers would open alone, which still opens alone: its envelopes of type are all settled again as they were with the page, in the same order and with the same checks, so each that opens live draws as it was weighed, and those the page held get their drawn art back. Where putting the drawn art of every live envelope back makes the layers draw as the page, it is still put back (#5065). In 224 users' files (used locally, never committed): envelopes of type that open live go from 174 to 186, in 8 files, none fewer in any file; no file changes between its layers and its PDF part; 7 renders change, by at most 0.7% of their pixels at 40 ppi (1 closer to the page, 1 alike, 5 further, by at most 0.7 of a percentage point, where VectorCraft's own envelope draws a little apart from the drawn art, within its check); the note for type in an envelope goes from 6 files. Of the 14 envelopes of type that had opened live and lost it to the page check, 2 keep their drawn art: one where the page draws something else where it is, and one in a file that comes in as its PDF part (#7141). Tests `build::candidate_tests::the_page_holds_back_only_envelopes_of_type_where_it_differs_from_them`, `envelopes_of_type_stay_live_within_half_of_what_the_page_check_allows`, `an_envelope_of_type_differing_in_more_of_its_pixels_than_its_check_allows_is_held_back`, `envelopes_of_type_the_layers_dont_draw_in_place_are_held_back`, `on_a_page_that_holds_all_the_art_an_envelope_of_type_past_it_is_held_back`, `objects_come_in_as_the_page_art_with_every_envelope_of_type_put_back_where_a_live_one_holds_a_difference`, `tests_native::layers_that_would_open_alone_keep_an_envelope_of_type_live_where_other_art_differs_from_the_page`, `layers_that_would_open_alone_keep_live_only_the_envelopes_of_type_the_page_doesnt_hold`, `trusted_layers_that_would_open_alone_open_alone_with_an_envelope_of_type_the_page_doesnt_hold_live`, `layers_with_objects_that_come_in_as_the_page_art_keep_an_envelope_of_type_that_draws_as_the_page_live`, `trusted_layers_keep_an_envelope_of_type_live_where_other_art_differs_from_the_page`, `trusted_layers_leave_an_envelope_of_type_the_page_draws_otherwise_its_drawn_art`, `build::candidate_tests::the_other_placement_of_placed_files_is_weighed_on_its_own`, `layers_that_draw_as_the_page_with_the_held_envelopes_of_type_put_back_are_used_so` | | 2026-11-13 | minor | PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke instead of being left out, adding no text (#6971; `empty_actual_text_keeps_the_glyphs_art` in `crates/pdf/src/tests/actual_text.rs`). Scores and estimates unchanged. | diff --git a/docs/mcp.md b/docs/mcp.md index 4abaa8bafe..fbface5b2d 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7560,7 +7560,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 @@ -8646,7 +8646,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` @@ -8676,9 +8678,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 @@ -8977,6 +8989,25 @@ file size), `seconds` to download at `kbps` (default 56.6), the size, and for pa `source` (the colour the reduction made), so a colour keeps its edits when it is web-shifted or snapped. `slice: n` previews one slice; `image: true` adds the file; `warnings` holds the export's warnings. +Optimize to File Size (the dialog's button under Preset) is `webExport.optimizeToFileSize {desiredK, startWith?, +use?, slice?, …settings}`. It searches for settings whose files fit in `desiredK` K (1 K is 1024 bytes; above 0, at +most 1048576) and returns them without writing a file or changing the remembered settings: `{targetBytes, achieved, +bytes, format, settings, trials, images, warnings}`. `startWith: current` (the default) keeps the format and takes the +highest JPEG quality (1 to the current quality) or the most GIF/PNG-8 colors (2 to the current count) that fit, +measured by encoding. A lower value can give a larger file, so the search measures up to 6 values spread over the +range, from the top down, and then narrows the step above the first one that fits. When no value measured fits, GIF +tries lossy 100 with the most colors that fit. PNG-24 has no +setting to lower. `startWith: auto` takes GIF for art with transparent pixels or at most 256 colors and JPEG +otherwise. With `transparency: false` it counts the colors the pixels have once blended over the matte, as the file +is written. For opaque art it tries the other format when the first one cannot reach the size. `use: allSlices` (the +default) measures the image, or the image slices' files together; `eachSlice` measures the largest slice file; +`currentSlice` measures `slice` (a number from `slice.list`), else the selected image slice, else the first. The +slices share one setting, so every `use` changes the setting of all of them. The search encodes at most 32 trial +settings. When none fits, `achieved` is false and `settings` are the smallest trial. A `desiredK` that is missing, +not a number, 0 or less or above 1048576 is an error, as are an unknown `startWith` or `use` and a `slice` that is +not a slice number or comes with another `use`. In the dialog, the desired size starts at the size of what Total of All +Slices measures with the current settings, rounded up to 0.001 K. + Presets: `webExport.presets.list` (built-in ones, then saved ones), `webExport.presets.save {name, newName?, …settings}`, `webExport.presets.delete {name}`; any name works as `preset` in the other commands (its settings, then the keys given). `webExport.settings {…}` remembers the settings the dialog opens on (`{}` reads them, `reset: true` restores the diff --git a/docs/roadmap.md b/docs/roadmap.md index bfaa10db30..9373b1f499 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -160,7 +160,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | | M2 | Drawing tools + smart guides | ✅ mostly done (#3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123) | 12–18 | | M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel (its spectrum grows with a resized panel, #8005), Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416; native Lab entry and swatch libraries in the picker, Assign-row menus, #8031/#4028); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 | -| M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | +| M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | | M5 | Performance | 🟡 background render + caches + MT done; `vectorcraft-cli bench` and `vectorcraft-cli perf` (budget suite); opaque solid-fill knockout paths draw once in hard-edge/supersampled raster export, with analytical-AA compositing unchanged; file format v2 opens 3× faster (50k paths: 722 → 244 ms); raster effects (glows, shadows, blur, feather) no longer force the whole frame single-threaded (filtered offscreen per effect, verified equal to the single-threaded reference); Craquelure/Mosaic Tiles/Stained Glass distance searches optimized with pixel-invariance checks and the `texture_drag_perf` probe (#1257); effect-heavy demos need a clean-machine benchmark; dirty-region rendering, GPU backend spike pending | 15–25 | | M6 | Path operations (Pathfinder, Shape Builder, offset…) | ✅ mostly done (live compound shapes: Make, Alt-click a Shape Mode, member modes, Release, Expand (#4522); single-result Pathfinder names and SVG IDs retained (#1293); Divide open-cutting-path geometry, appearance and history verified (#1307; existing segment cap remains); Simplify preview/counts and rewritten-path component selection verified (#1272; the slider opens at the Auto-Simplify level; a Direct Selection part of a path simplifies on its own); Compound appearance and member fill-rule edits verified (#1197); Boolean precision on almost-horizontal edges fixed and the property tests made deterministic; Shape Builder gap detection, large-offset bug open); Shape Builder Gap Detection shares Live Paint’s spatial gap finder and temporary merge bridges (#2526); Custom is capped at 72 pt in the existing options dialog | 3–6 | | M7 | Type (point/area/path, editing, styles, OpenType, threading, glyphs) | Spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, the custom dictionary and Ignore All commands, Auto Spell Check with its right-click suggestions, Ignore All and Add to Dictionary, Spelling › Auto Spell Check in the context menu of type, the Edit Custom Dictionary dialog, and the modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `Cmd+I`, `ui.checkSpelling`, #4936); Right-aligned area type sets the text after a line's last tab against the right edge, the text before it at its stops (#6147); A line a soft return ends is justified as a wrapped line is (#6137); Indian-language pattern hyphenation preserves syllables in both composers (#4947); 🟡 Hanging punctuation keeps its published amounts under Glyph Scaling, and Standard burasagari counts a hung line start as room; Fullwidth `!` / `?` keep an upright fallback in vertical type; Hyphenation… and Justification… per paragraph (#2310, #2755), Auto Leading also driving the Character panel's Leading, the Alt+↑/↓ leading nudge and Fill with Placeholder Text; Document-point character controls after object/group scaling (#1034; optional font-size preservation remains separate), Character/Paragraph Styles (explicit Auto-leading resets and local leading overrides), per-paragraph paragraph attributes, mixed paragraph alignment indication (headless regressions, full integration CI and visual review pass), Area Type Options (with Width/Height, Auto Size and Shrink Text to Fit; overflow reported to agents and vertical Align), type areas resized by their handles and reshaped with Direct Selection, threaded text, Fit Headline, Glyphs (feature-valued alternates and unencoded glyphs applied in one Undo step while keeping Arabic joining, #5514), OpenType panel (including font-defined Stylistic Sets), Find Font (Document, Recent and System replacement sources, #5217), installed system fonts in every font menu (fonts registered with Windows outside its font folders, the XDG and Flatpak host font folders on Linux, and fonts installed while the app runs, listed when it comes back to the front; searchable; the Character and Properties menus show each family's sample of the selected text, preview it live under the pointer or ↑/↓, show recently applied families first (#3515), filter by script and kind, list a family's styles, and star favourites; the Glyphs panel and Find Font's Replace With use the same menu without the live preview) and found by name on open/import (full-name aliases and Missing Fonts searches verified, #1258; Windows font-service QA pending), variable fonts' named instances as styles, CJK names in the UI, input methods (marked text in place, candidate window at the caret; Japanese IME), Text Wrap (offset, invert, both sides of an object; follows edits), Type on a Path effects and Options with draggable start/centre/end brackets (slide, flip), tab stops + Tabs panel (Above Text floats it over the selected text, its ruler at the canvas zoom so stops line up with the columns, #729), inline symbols in text (beyond parity), Hebrew/Arabic bidirectional text, Paragraph Direction, Every-line/Single-line Composer per object (ragged text too) done; paint-only Arabic harakat keep joining with GDEF-mark ownership and Insert Kashidas tatweels on the base letter's paint (`tests::harakat`); tab leaders, vertical type pending | 45–60 | @@ -212,6 +212,8 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | +| 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | | 2026-11-16 | minor | M1: rows or the selected-art square dragged over the Layers panel's list show the copy cursor while Alt is held, as the drop then copies, and the grabbing hand otherwise (#8217). Scores and estimates unchanged. | | 2026-11-16 | minor | Gradient panel: the strip under the ramp, where a click adds a stop, shows the white arrow with a plus on Windows and X11, where the system copy cursor showed as the plain arrow (#8241). Scores and estimates unchanged. | | 2026-11-16 | minor | Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index aff05e1e14..a36f79aca1 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (Outline Stroke is in the canvas context menu (#5267; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (Outline Stroke is in the canvas context menu (#5267; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -61,6 +61,8 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | +| 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | | 2026-11-16 | minor | Recolor Artwork › Assign: native Lab entry in the Color Picker, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#4028); scores and estimates unchanged. | | 2026-11-15 | minor | PDF import: stroked type (text rendering modes 1, 2, 5 and 6, and glyphs under `ActualText`) keeps the line cap, line join and miter limit of the graphics state it is stroked with, as paths do, instead of butt caps, miter joins and a miter limit of 10; a glyph filled and then stroked otherwise than the run its fill joined comes in as a run of its own, so the glyphs before it keep their stroke (#7741; `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`). Scores and estimates unchanged. | | 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); area score and estimate unchanged. | @@ -269,9 +271,9 @@ dominate; 3D, graphs and automation are specialist). They sum to 105. Feature de | Image Trace, graphs, image tools | 3 | 75% | graph Column designs, Image Trace Create Strokes depth (Create Object Mosaic is done; junction-returning piece survival has source-generated regressions in `image-trace-quality.md`; large images trace with a warning; Auto Color keeps rare distinct colours) | 5–8 | estimated (raised from 72%); quick presets reveal adjustment controls, Properties reopens them | | Layers, artboards, document setup | 5 | 78% | Selected-artboard deletion is consistent across panel actions (all-selected retains artboard 1); history prunes removed indices while preserving valid multiselection; remaining: 30.0's artboard locking and colours and managing artboards from the canvas, Layers row menu commands beyond Collect for Export and menus on guide and blend spine rows (click-to-fit objects is done, #1227) | 5–8 | estimated (lowered from 82%: target moved); Artboard deletion keys keep artwork and the first of an all-selected set; Artboard Options' Show Center Mark and Show Cross Hairs draw on the canvas only (exports and print leave them out), regression-tested; Artboard Options' Show Video Safe Areas and Video Ruler Pixel Aspect Ratio (per artboard, native format) are done ([video display options](#evidence-what-ships-today-by-area)), score unchanged | | View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged); document-tab artwork hover/copy and lossless transfer tested (2026-10-22; score/hours unchanged); cached canvas reprojection preserves scale during resize, rotation and DPI changes (regression and contributor original-file evidence below; scores/hours unchanged); cached canvas dimensions match the renderer limit before cache-key creation, view construction and worker submission (regression evidence below) | -| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), no writing of Illustrator's editing data (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.| 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); DXF export's Include Placed Images and Include Fill Hatches options, off in CNC / CAM (`images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`; score, gaps and hours unchanged); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`; the distance from the path under Align to Path is measured from the top of each character's em box, half the height of the top of its H or the bottom of its font's bounding box (`tests_native::aligned_type_lies_as_far_from_its_path_as_the_file_lays_it_out`), and the fit under Gravity does not reproduce the file's layout), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. | -| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, textures, map art and shading in 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.| 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. | -| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.| 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Save refusal continuation (#6146): `READ_ONLY_LOCATION`, Save As on ordinary UI Save only; regression execution pending; score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. | +| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), no writing of Illustrator's editing data (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); DXF export's Include Placed Images and Include Fill Hatches options, off in CNC / CAM (`images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`; score, gaps and hours unchanged); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`; the distance from the path under Align to Path is measured from the top of each character's em box, half the height of the top of its H or the bottom of its font's bounding box (`tests_native::aligned_type_lies_as_far_from_its_path_as_the_file_lays_it_out`), and the fit under Gravity does not reproduce the file's layout), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. | +| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, textures, map art and shading in 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. | +| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Save refusal continuation (#6146): `READ_ONLY_LOCATION`, Save As on ordinary UI Save only; regression execution pending; score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. | | View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged); document-tab artwork hover/copy and lossless transfer tested (2026-10-22; score/hours unchanged); cached canvas reprojection preserves scale during resize, rotation and DPI changes (regression and contributor original-file evidence below; scores/hours unchanged) | | View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged) | | Guides, grids, smart guides, snapping, rulers | 3 | 80% | "intersect" smart guides for a moved selection's anchors (drawn points and dragged anchors snap to intersections, #1658) | 4–7 | estimated (lowered from 85%: target moved); Control bar snapping quick access includes Snap to Glyph and Alignment Guides (#6164); new ruler-guide Alt orientation implemented; global/artboard ruler modes (`view.globalRulers`) and video rulers (View › Rulers › Show Video Rulers, #2849) done; status-bar X/Y uses the active ruler origin and General units; score unchanged | @@ -534,7 +536,7 @@ about 1–1.5 agent-hours each, so the other rows (estimated on the older scale) | Layers, artboards, document setup | 5 | 82% | Layers panel: a confirmation before deleting layers that hold art, row menu commands beyond Collect for Export (now on every layer, sublayer, group and object row), menus on guide and blend spine rows, the Layer Options dialog for several rows with mixed values, Paste Remembers Layers for sublayers; artboard preset polish (artboard escape routing and document setup modal handoff done; Move Artwork for artboard X/Y edits, Rearrange All Artboards, Document Setup, New Document and the rest of the Layers panel are done) | 4–7 | | View & navigation | 3 | 70% | New View/Edit Views, multiple windows/arrange, Snap to Pixel/Glyph (print tiling is done) | 9–14 | | Guides, grids, smart guides, snapping, rulers | 3 | 85% | global/video rulers, Spacing Guides' distance readouts and spacing for resized or drawn art, Alt swapping a ruler guide's orientation, ruler guides selected together with art (marquee, Shift-click), ruler guides as Layers rows with their own lock and hide (#451: Lock Guides locks them all; Make Guides paths are Layers rows already) (dragging existing guides is done, #414; new guides snapping to side midpoints and artboards, and artboard guides, #451; the drawing tools snapping, with Construction Guides, #506; Spacing Guides for moves, #394; moves snapping to the grid, #740; ruler guides pulling drawn points with Smart Guides on, and "center" and "anchor" labels while hovering with the Selection tool, #812; distance and angle labels while drawing, #2983) | 2–4; status-bar X/Y uses the active ruler origin and General units | -| File formats | 6 | 85% | PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; scores and estimates unchanged); PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); Explicit editing-data oversized single-artboard import fixed (#6865); scores and estimates unchanged. Legacy `.ai` files that name but omit their prolog open with their layers, or with their art on one layer when the format has no layers; graph data and settings in these files still come in only as drawn art. Affinity export, and the rest of Affinity import (adjustments, blur and bevel effects, brushes, live symbol instances, text threading), DWG (no open spec: DXF instead), PSD placement as layers (Photoshop Import Options; the merged image is done), EPS checked against more real files users send (Inkscape files open as vectors; other generators' constructs are tested with programs written from the PostScript Language Reference only; CID-keyed CJK type and `CCITTFaxDecode` images not read), the rest of Illustrator's editing data (appearances and live effects, symbols, pattern fills, brushes, placed files: #637), the remaining fidelity polish; EPS, DXF, EMF/WMF, TIFF, BMP, Targa, PSD export, SVGZ, PDF security, PDF/X, PDF layers, presets and Affinity import are done | 6–10 (existing scope; Affinity export unestimated) | +| File formats | 6 | 85% | PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one; scores and estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; scores and estimates unchanged); PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); Explicit editing-data oversized single-artboard import fixed (#6865); scores and estimates unchanged. Legacy `.ai` files that name but omit their prolog open with their layers, or with their art on one layer when the format has no layers; graph data and settings in these files still come in only as drawn art. Affinity export, and the rest of Affinity import (adjustments, blur and bevel effects, brushes, live symbol instances, text threading), DWG (no open spec: DXF instead), PSD placement as layers (Photoshop Import Options; the merged image is done), EPS checked against more real files users send (Inkscape files open as vectors; other generators' constructs are tested with programs written from the PostScript Language Reference only; CID-keyed CJK type and `CCITTFaxDecode` images not read), the rest of Illustrator's editing data (appearances and live effects, symbols, pattern fills, brushes, placed files: #637), the remaining fidelity polish; EPS, DXF, EMF/WMF, TIFF, BMP, Targa, PSD export, SVGZ, PDF security, PDF/X, PDF layers, presets and Affinity import are done | 6–10 (existing scope; Affinity export unestimated) | | Export for Screens, Asset Export, slices, Save for Web | 3 | 85% | polish only (all four are done) | 2–4 | | Print, colour management, separations, flattener | 3 | 80% | print preview fidelity (flattener presets in PDF and print, overprint in PDF and composite print, Print dialog, presets, PostScript, marks, separations, Print Tiling, print overprint/flattener/bitmap options and printer profile are done, as are the Japanese papers in its Media list: JIS B4/B5/B6, はがき, 往復はがき, 封筒 長形3号/長形4号/角形2号/角形3号 and 四六判, beside the ISO B4/B5 that settings saved before them keep) | 1–2 | | Automation | 3 | 65% | scripting surface, batch (MCP drops malformed app replies without replay; Variables: text/visibility variables bound to objects, an object may carry several, dataset rows applied in one undo step, panel and Window › Variables with dialogs; image/graph kinds and dataset import/export open) | 6–10 | @@ -590,6 +592,8 @@ since 2026-10-01. - **PDF authored replacement text (#6165):** `crates/pdf/src/tests/actual_text.rs` covers replacement once with suffix placement, PDF text-string decoding, empty and nested owners, sibling spans, page reset, multiple text-show operations, style/line changes, fill-and-stroke, reader windows and bounded input. Authored logical-order stretches are protected while adjacent ordinary text still undergoes reconstruction. The replacement takes its first placed glyph's style and line; its characters are not redistributed over later lines/styles. Exact mixed-direction paragraph layout is not claimed. No export changes; scores and hours stay at 75% / 10–20 h. - **PDF stroked type (#7741):** `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs` covers round, projecting and butt caps, round, bevel and miter joins and a miter limit of 3 on type stroked in rendering modes 1, 2, 5 and 6, shown as a word, a glyph at a time and under `ActualText`; glyphs stroked with another join as runs of their own; and a glyph filled and stroked after one stroked otherwise, which keeps the join of the glyph before it. Synthetic PDFs written in the test (standard Helvetica, not embedded); no fonts or fixtures added. The dash array is not yet carried to the characters. + +- **PDF type filled then stroked (#8015):** `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs` covers a word shown at once, a `TJ` array of two strings with kerning between them, a line over two `Tj` and a glyph at a time, also under `ActualText`, in text rendering modes 0, 1, 2, 4, 5 and 6: modes 2 and 6 come in as one type object `WAVE` filled #ffffcc with a 3 pt black stroke, round cap and join, modes 1 and 5 stroke only, 0 and 4 fill only; a Type 3 font is filled once in every mode (the reader paints Type 3 glyphs as their procedures draw them); a stroke join that changes between two operators keeps a run each; and filled type with stroked type of its own below it stays two objects. `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs` covers a vertical column in modes 2 and 6. `a_stroke_at_another_size_does_not_go_over_the_filled_glyph` and `a_stroke_over_one_glyph_of_a_filled_word_strokes_only_that_glyph` (also in `textstroke.rs`) cover a word filled and then its first glyph stroked from the same origin: at another size it stays type of its own, and at the same size only that glyph is stroked. `translucent_fill_and_stroke_text_stays_two_objects` (in `textstroke.rs`) covers type filled and stroked at the same opacity: at 0.5 it stays a filled object and a stroked one, as the file composites them apiece, and opaque it is one. `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled` in `crates/pdf/src/tests/reshaped.rs` covers a vertical line of Devanagari with one glyph filled and stroked: every glyph comes in filled. Not covered: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Synthetic PDFs written in the tests; no fonts or fixtures added. - **PDF Indic type (#5235, #6906):** `crates/pdf/src/tests/reshaped.rs` covers a vowel sign the file draws before its consonant (the line keeps the file's glyphs as outlines, with a note), text in reading order (stays type), a mark with no advance (stays on its line, not vertical type of its own), outlined glyphs stroked with different dashes and translucent outlined glyphs (each keeps its own path). Synthetic font only; one real Gujarati file checked by eye on page 1. Indic type in an uninstalled font keeps the file's glyphs as outlines; reordering signs so more lines stay editable is not done. Scores and hours stay at 75% / 10-20 h. @@ -877,6 +881,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Export for Screens with Include Bleed: a PDF row's page keeps the artboard as its TrimBox and puts the bleed around it once as the BleedBox (a 100 pt artboard with a 9 pt document bleed gives a 100 pt TrimBox in a 118 pt BleedBox, in one file per artboard, a single file and the Full Document), so printer's marks line up with the artboard's edge. The bleed is the row's own (zero included, which a PDF/X row warns about), else the document's when the row sets none and its PDF preset gives none or a bleed of 0; raster, SVG and EPS rows still write the grown artboard. Tests: `fileio::tests_screens::include_bleed_pdf_pages_trim_at_the_artboard` and `include_bleed_pdfx_rows_do_not_warn_about_the_bleed`. - Export for Screens refuses `pdfs: "single"` with `assets`, `layers` or `selection: "each"`, whose files each hold one item's art, instead of writing the first item alone as one PDF named after the document; `pdfs: "multiple"` writes a PDF of each item, and the selection as one file writes one PDF either way. The rule is VectorCraft's own. Tests: `fileio::tests_screens::single_file_pdfs_are_refused_for_assets_layers_and_each_object`. - Save for Web: Preview in Browser writes each preview's page and images to a folder of its own inside `VectorCraft Save for Web` in the system's temporary folder. A later preview, from the same app or another one running, does not overwrite an earlier one. Each preview first removes the preview folders there that are an hour old or older and, on Linux, macOS and FreeBSD, belong to the current user; it leaves other files and folders alone. The folders a preview makes there are open to their owner only on those systems. When `VectorCraft Save for Web` is a link or is not a folder, or on those systems belongs to another user or can be written by other users, the preview goes to a new folder of its own in the temporary folder, which a later preview removes once it is an hour old (`file.saveForWeb.browser`). + - Save for Web: Optimize to File Size… opens rows for a desired file size in K, Start With (Current Settings, Auto Select GIF/JPEG) and, with slices, Use (Total of All Slices, Each Slice, Current Slice); OK takes the settings whose files fit and shows the size found, or says that no setting tried fits ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=395)). The search lowers JPEG quality or palette colors (GIF then lossy) and encodes at most 32 trial settings; Auto Select chooses GIF for transparent art or art of at most 256 colors and JPEG otherwise. The slices share one setting, so every Use choice changes all of them (`webExport.optimizeToFileSize`). Scores and estimates are unchanged. - Save for Web: while Alt (Option on macOS) is held, the dialog's Cancel button reads Reset, which puts the remembered settings back on the document's active artboard and leaves the dialog open (`ui.dialogReset`). - Export for Screens, Save for Web (slice images, and files named after the document's title) and the Libraries panel name files with the characters Windows does not allow written as `-` and with a `-` after a Windows device name such as `CON`, on every platform (`document.exportForScreens`, `document.exportForWeb`, `library.create`). - Variables (data merge): text, visibility and image variables bound to objects (an object may carry several), dataset rows applied in one undo step (`variable.*`, `dataset.*`) from a Variables panel and Window › Variables, with dialogs to define, bind and edit, Make Text/Visibility/Image Dynamic, Capture/Update Data Set, CSV import/export (`dataset.import` / `dataset.export`), and a row in italics when an edit leaves the art not matching it; an image dataset value is a file path and apply keeps the object's bounds; bindings let go of deleted art and locked art is left alone except by visibility values; every command, like the rest, is drivable over MCP and the CLI. @@ -2050,6 +2055,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - A Shift-click with the loaded place cursor opens the current file's import options (text, DXF, PDF page or embedded PSD) and OK places it at the click, with Show Import Options on or off and for a cursor loaded by `file.place.queue` ([Place multiple files](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf)). VectorCraft's own rules: a file without such a dialog places as a click does, Cancel leaves the file unplaced, a Shift-drag places at the dragged size, and headless the Shift-click places as a click (`crates/tools/src/place.rs`, `crates/engine/src/tests/place.rs`, `crates/ui-egui/src/tests/place.rs`). - 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 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 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 are not marked, paints already set to overprint keep that setting, 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. On a plate, an overprinting paint that puts none of that plate's ink down is drawn as nothing; on PostScript plates so is up to half a percent of another ink in a color that counts as black, and any other faint ink stays on the plate. 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_paints_keep_their_faint_ink_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 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).