Fix #8034: review fixes for pattern swatches from another document

- swatch.library.add lists a library pattern swatch that stands for a
  swatch added earlier in the same call under existing, not twice
  under added.
- An empty library file (.gpl, .ase, .vcswatches) loads as an empty
  library again; only a document with no swatches is refused. A
  PostScript file whose swatches are only the default ones is refused
  like a .ai or .eps.
- The Swatch Libraries filter of Other Library… also lists .ait and
  .epsf files.
- The library panel finds a loaded library's pattern swatch by looking
  only at libraries that have pattern swatches.
- The Czech message for Copy to User Defined names pattern swatches.
- Color spelling in the new params text and comments; docs/mcp.md
  rewrapped.
This commit is contained in:
dotCooCoo
2026-11-16 01:12:03 -08:00
parent 98f5086c20
commit dec5025147
7 changed files with 89 additions and 46 deletions
+1 -1
View File
@@ -497,7 +497,7 @@ fn library_open_filters_list_library_formats_first() {
#[test]
fn the_swatch_library_filter_lists_ai_and_eps_files() {
let filters: Vec<_> = library_open_filters("Swatch libraries", crate::cmd::swatchlib::LIBRARY_PICK_EXTS).collect();
for ext in ["ai", "eps", "ase", "gpl", "acb", "vcswatches"] {
for ext in ["ai", "ait", "eps", "epsf", "ase", "gpl", "acb", "vcswatches"] {
assert!(filters[0].1.contains(&ext), "{ext}: {:?}", filters[0]);
}
assert_eq!(filters.iter().filter(|f| f.0 == "Swatch libraries").count(), 1, "{filters:?}");
+17 -5
View File
@@ -491,22 +491,34 @@ fn a_pattern_from_a_ai_library_keeps_a_color_the_library_lacks() {
std::fs::remove_dir_all(&dir).ok();
}
/// A `.ai` file without a palette of its own, and a library file with no swatches, are refused as
/// A `.ai` file without a palette of its own, and a document with no swatches, are refused as
/// swatch libraries with a message, not listed as the default swatches or as an empty library. A
/// damaged `.ai` is refused with the reader's error, and neither is listed.
/// damaged `.ai` is refused with the reader's error, and none of them is listed. A library file
/// with no swatches loads as an empty library.
#[test]
fn swatch_library_files_without_swatches_or_damaged_are_refused() {
fn swatch_library_documents_without_swatches_or_damaged_are_refused() {
let mut s = Session::new();
s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap();
s.edit("Clear", |d, _| {
d.swatches.clear();
d.swatch_groups.clear();
Ok(())
})
.unwrap();
let b64 = s.execute("document.serialize", &json!({})).unwrap()["dataBase64"].as_str().unwrap().to_string();
let e = s.execute("swatch.library.load", &json!({"dataBase64": b64, "name": "Bare.vectorcraft"})).unwrap_err().to_string();
assert!(e.contains("`Bare.vectorcraft` has no swatches of its own"), "{e}");
let data = ai::editing_data(200.0, 100.0, &ai::layer("Art", &format!("0 0 0 1 k\n{}f\n", ai::rect(10.0, 50.0, 40.0, 90.0))));
let p = json!({"dataBase64": vectorcraft_format::base64_encode(&ai::ai(&compressed(data.as_bytes()), "1 0 0 rg 10 50 30 40 re f")), "name": "art.ai"});
let e = s.execute("swatch.library.load", &p).unwrap_err().to_string();
assert!(e.contains("`art.ai` has no swatches of its own"), "{e}");
let e = s.execute("swatch.library.load", &json!({"data": "GIMP Palette\nName: Empty\n#\n", "name": "Empty.gpl"})).unwrap_err().to_string();
assert!(e.contains("`Empty.gpl` has no swatches of its own"), "{e}");
let damaged = json!({"data": "%PDF-1.4\n%damaged\n", "name": "damaged.ai"});
assert!(s.execute("swatch.library.load", &damaged).is_err());
let list = s.execute("swatch.library.list", &json!({})).unwrap();
assert!(list["libraries"].as_array().unwrap().iter().all(|l| l["category"] != "loaded"), "{list}");
// A library file without swatches still loads, as an empty library.
let r = s.execute("swatch.library.load", &json!({"data": "GIMP Palette\nName: Empty\n#\n", "name": "Empty.gpl"})).unwrap();
assert_eq!(r["count"], json!(0), "{r}");
}
/// Other Library… on a `.ai` graphic style library (art styles, their list and no layers) gives the
+35 -32
View File
@@ -76,7 +76,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Other Library…",
["Window", "Swatch Libraries"],
None,
"{path? | data?: file text | dataBase64?, name?: file name (default: the path's)} load a .vcswatches, .gpl, .ase (swatch exchange) or .acb (color book, read only) library, or the swatches of any document VectorCraft opens (see document.formats), such as a .ai or .eps swatch library, for the library panel (Window → Swatch Libraries lists it until the app quits; a file of the user library folder, or a file with the same extension and bytes as one there, opens as that User Defined library). A document's colors, tints, gradients and pattern swatches come in, in its order and colour groups; swatch.library.add brings a pattern swatch's pattern with it. A file with no swatches is an error, and so is a .ai or .eps whose swatches are only the default ones (it has no palette of its own) → {library: id, name, count}",
"{path? | data?: file text | dataBase64?, name?: file name (default: the path's)} load a .vcswatches, .gpl, .ase (swatch exchange) or .acb (color book, read only) library, or the swatches of any document VectorCraft opens (see document.formats), such as a .ai or .eps swatch library, for the library panel (Window → Swatch Libraries lists it until the app quits; a file of the user library folder, or a file with the same extension and bytes as one there, opens as that User Defined library). A document's colors, tints, gradients and pattern swatches come in, in its order and color groups; swatch.library.add brings a pattern swatch's pattern with it. A document with no swatches is an error, and so is a .ai, .eps or PostScript file whose swatches are only the default ones (it has no palette of its own) → {library: id, name, count}",
always,
load
),
@@ -85,7 +85,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Copy to User Defined",
["Window", "Swatch Libraries"],
None,
"{library: id or name of a loaded library (category \"loaded\", swatch.library.load)} copy it into the user library folder of the desktop app, whose libraries VectorCraft lists as User Defined every time it starts (a loaded library is listed until the app quits): a library file as it is, the swatches of a document or a library loaded from data as a .vcswatches file (a library with pattern swatches is refused: a .vcswatches file can't hold them). A name the folder already has gets a number (\"Brand 2.ase\") and no file is replaced; when the folder already holds the same file, that file is used. The library is then listed as User Defined only, and until the app quits commands given its loaded id use the copy; a User Defined library comes back as it is → {library: its User Defined id, name, count, path (left out when it is outside the read roots), copied: false when nothing was written}",
"{library: id or name of a loaded library (category \"loaded\", swatch.library.load)} copy it into the user library folder of the desktop app, whose libraries VectorCraft lists as User Defined every time it starts (a loaded library is listed until the app quits): a library file as it is, the swatches of a document or a library loaded from data as a .vcswatches file (a library with pattern swatches is refused). A name the folder already has gets a number (\"Brand 2.ase\") and no file is replaced; when the folder already holds the same file, that file is used. The library is then listed as User Defined only, and until the app quits commands given its loaded id use the copy; a User Defined library comes back as it is → {library: its User Defined id, name, count, path (left out when it is outside the read roots), copied: false when nothing was written}",
has_user_folder,
copy_to_user
),
@@ -153,8 +153,8 @@ impl LibraryFile for SwatchLibrary {
pub const LIBRARY_EXTS: &[&str] = &["vcswatches", "gpl", "ase", "acb"];
/// The extensions the Swatch Libraries filter of Other Library… lists: the library files, and the
/// `.ai` and `.eps` documents whose swatches load as a library (`swatch.library.load`).
pub const LIBRARY_PICK_EXTS: &[&str] = &["vcswatches", "gpl", "ase", "acb", "ai", "eps"];
/// `.ai`, `.ait` and `.eps` (`.epsf`) documents whose swatches load as a library (`swatch.library.load`).
pub const LIBRARY_PICK_EXTS: &[&str] = &["vcswatches", "gpl", "ase", "acb", "ai", "ait", "eps", "epsf"];
impl Libraries<SwatchLibrary> {
/// Keep `doc`, the document loaded library `id` was read from, for its pattern swatches; `None`
@@ -172,12 +172,15 @@ impl Libraries<SwatchLibrary> {
}
/// The document holding the pattern of swatch `w`, when `w` is one of a loaded library's own
/// pattern swatches (a library panel draws them from it).
/// pattern swatches (a library panel draws them from it). Only the libraries that have pattern
/// swatches are looked at, each by the address ranges of its swatch lists.
pub fn pattern_source(&self, w: &Swatch) -> Option<Arc<vectorcraft_doc::Document>> {
let Paint::Pattern { pattern, .. } = &w.paint else { return None };
let own = |lib: &SwatchLibrary| lib.iter().any(|s| std::ptr::eq(s, w));
let e = self.extra.iter().find(|e| own(&e.lib))?;
self.pattern_doc(&e.info.id).filter(|d| d.pattern(pattern).is_some())
let at = std::ptr::from_ref(w);
let holds = |v: &[Swatch]| v.as_ptr_range().contains(&at);
let own = |lib: &SwatchLibrary| holds(&lib.swatches) || lib.groups.iter().any(|g| holds(&g.swatches));
let (_, doc) = self.pattern_docs.iter().find(|(id, _)| self.extra.iter().any(|e| e.info.id == **id && own(&e.lib)))?;
Some(doc.clone()).filter(|d| d.pattern(pattern).is_some())
}
}
@@ -780,26 +783,22 @@ fn load(s: &mut Session, p: &Value) -> Result<Value> {
let mut patterns = None;
let (info, lib) = s.swatch_libraries.load(p, C, |bytes, file| {
// A library file, or a document whose swatches become the library.
let lib = if palette_io::sniff_bytes(bytes) {
palette_io::read_bytes(bytes, stem(file)).map_err(|e| bad(C, e))?
} else {
let loaded = super::fileio::load(file, bytes).map_err(|e| bad(C, e.to_string()))?;
if loaded.preview_only {
return Err(bad(C, "only this Affinity file's embedded preview could be read; use File › Open to see it with its warning"));
}
// A `.ai` or EPS file without a palette of its own opens with the default swatches.
if matches!(loaded.format.id, "ai" | "ait" | "eps") && has_only_default_swatches(&loaded.doc) {
return Err(bad(C, format!("`{file}` has no swatches of its own")));
}
let lib = document_library(&loaded.doc, &[], stem(file).to_string(), true, C)?;
if lib.iter().any(|w| matches!(w.paint, Paint::Pattern { .. })) {
patterns = Some(Arc::new(loaded.doc));
}
lib
};
if lib.is_empty() {
if palette_io::sniff_bytes(bytes) {
return palette_io::read_bytes(bytes, stem(file)).map_err(|e| bad(C, e));
}
let loaded = super::fileio::load(file, bytes).map_err(|e| bad(C, e.to_string()))?;
if loaded.preview_only {
return Err(bad(C, "only this Affinity file's embedded preview could be read; use File › Open to see it with its warning"));
}
// A `.ai`, EPS or PostScript file without a palette of its own opens with the default swatches.
let defaults = matches!(loaded.format.id, "ai" | "ait" | "eps" | "ps") && has_only_default_swatches(&loaded.doc);
let lib = document_library(&loaded.doc, &[], stem(file).to_string(), true, C)?;
if defaults || lib.is_empty() {
return Err(bad(C, format!("`{file}` has no swatches of its own")));
}
if lib.iter().any(|w| matches!(w.paint, Paint::Pattern { .. })) {
patterns = Some(Arc::new(loaded.doc));
}
Ok(lib)
})?;
if info.category == "loaded" {
@@ -808,7 +807,7 @@ fn load(s: &mut Session, p: &Value) -> Result<Value> {
Ok(json!({"library": shown_library_id(s, &info.id), "name": info.name, "count": lib.len()}))
}
/// `d`'s swatches and colour groups are exactly the default ones of a colour mode, as a new
/// `d`'s swatches and color groups are exactly the default ones of a color mode, as a new
/// document's are.
fn has_only_default_swatches(d: &vectorcraft_doc::Document) -> bool {
use vectorcraft_color::cms::Model;
@@ -962,8 +961,10 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
let added: Vec<(String, String)> = if fresh.is_empty() {
vec![]
} else {
s.edit("Add to Swatches", |d, _| {
let (added, reused) = s.edit("Add to Swatches", |d, _| {
let mut out = vec![];
// Library pattern swatches that stand for a swatch added earlier in this call.
let mut reused = vec![];
// Each library group goes into one document group: the group of that name the document
// already had, or one made here.
let before = d.swatch_groups.len();
@@ -973,11 +974,11 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
let (name, sw) = if let (Paint::Pattern { pattern, .. }, Some(src)) = (&w.paint, &patterns) {
// The pattern comes with its swatch; a pattern the document has without one
// gets one. The swatch a pattern that comes in brings is named after the pattern:
// it takes the library swatch's name and colour group instead.
// it takes the library swatch's name and color group instead.
let had = taken_names(d);
let target = patternlib::import(d, src, pattern)?;
if let Some(name) = library_pattern_swatch(d, w, &target).filter(|n| had.contains(n)) {
out.push((w.name.clone(), name));
reused.push((w.name.clone(), name));
taken = taken_names(d);
continue;
}
@@ -1022,8 +1023,10 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
}
out.push((w.name.clone(), name));
}
Ok(out)
})?
Ok((out, reused))
})?;
existing.extend(reused);
added
};
let names = |list: &[(String, String)]| list.iter().map(|(_, n)| n.clone()).collect::<Vec<_>>();
let mut out = json!({"library": shown_library_id(s, &info.id), "added": names(&added), "existing": names(&existing)});
+28
View File
@@ -341,6 +341,34 @@ fn another_documents_pattern_swatches_of_one_pattern_add_as_separate_swatches()
assert_eq!(again["added"], json!([]), "{again}");
}
/// A library swatch named after its pattern, added in one call after another swatch of that pattern
/// with the same placement, stands for the swatch just added: it is listed as existing, not added
/// again.
#[test]
fn a_pattern_swatch_named_after_its_pattern_reuses_one_added_in_the_same_call() {
use std::sync::Arc;
let mut s = session();
s.edit("Pattern", |d, _| {
let path = vectorcraft_geom::shapes::ellipse(vectorcraft_geom::Rect::new(0.0, 0.0, 4.0, 4.0));
let dot = vectorcraft_doc::Node::path(d.alloc_id(), path, vectorcraft_doc::Appearance::default_art());
let tile = vectorcraft_geom::Rect::new(0.0, 0.0, 8.0, 8.0);
d.patterns.push(vectorcraft_doc::PatternDef { tile, ..vectorcraft_doc::PatternDef::new("Dots", vec![Arc::new(dot)]) });
for name in ["Tiles", "Dots"] {
let paint = Paint::Pattern { pattern: "Dots".into(), xf: vectorcraft_geom::Affine::IDENTITY };
d.swatches.push(vectorcraft_color::Swatch { name: name.into(), paint, global: false, spot: false });
}
Ok(())
})
.unwrap();
let b64 = run(&mut s, "document.serialize", json!({}))["dataBase64"].as_str().unwrap().to_string();
let id = run(&mut s, "swatch.library.load", json!({"dataBase64": b64, "name": "Dots.vectorcraft"}))["library"].clone();
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Tiles", "Dots"]}));
assert_eq!((&r["added"], &r["existing"]), (&json!(["Tiles"]), &json!(["Tiles"])), "{r}");
let d = doc(&s);
assert_eq!(d.swatches_iter().filter(|w| matches!(&w.paint, Paint::Pattern { pattern, .. } if pattern == "Dots")).count(), 1, "{r}");
}
#[test]
fn swatch_exchange_files_load_add_and_list_as_user_libraries() {
let bytes = vectorcraft_testkit::ase::sample();
+1 -1
View File
@@ -8229,7 +8229,7 @@ breakText Glyphs Glyfy
@msg `{id}` is no writable format (see document.formats) `{id}` není formát, který lze zapisovat (viz document.formats)
@msg `{id}` isn't a loaded library `{id}` není načtená knihovna
@msg `{file}` has no swatches of its own `{file}` nemá žádné vlastní vzorky
@msg `{_1}` has pattern swatches, which a .vcswatches file can't hold `{_1}` obsahuje vzorky, které soubor .vcswatches nepojme
@msg `{_1}` has pattern swatches, which a .vcswatches file can't hold `{_1}` obsahuje vzorkové položky vzorníku, které soubor .vcswatches nepojme
@msg `{key}` has no colours `{key}` neobsahuje žádné barvy
@msg `{key}` holds more than {MAX_EDIT_WORDS} words `{key}` obsahuje více než {MAX_EDIT_WORDS} slov
@msg `{key}` is a design name `{key}` je název návrhu
Can't render this file because it is too large.
+6 -6
View File
@@ -4889,14 +4889,14 @@ them as process colors; `.acb` files are read, never written. A file in the user
same extension and bytes as one there, loads as that User Defined library (category `user`).
From a document, such as a `.ai` or `.eps` swatch library, it reads the colors, tints, gradients and pattern swatches
in the document's order and color groups; `swatch.library.add` brings a pattern swatch's pattern, with its tile and
art, into the document as a pattern swatch under the library swatch's name and in its color group. A file with no
swatches, and a `.ai` or `.eps` file whose swatches are only the default ones, are refused with
"`<file>` has no swatches of its own". The Swatch Libraries filter of Other Library… lists `.ai` and `.eps` files
as well as the library files.
art, into the document as a pattern swatch under the library swatch's name and in its color group. A document with
no swatches, and a `.ai`, `.eps` or PostScript file whose swatches are only the default ones, are refused with
"`<file>` has no swatches of its own". The Swatch Libraries filter of Other Library… lists `.ai`, `.ait` and `.eps`
(`.epsf`) files as well as the library files.
`swatch.library.copyToUser {library}` copies a loaded library into the user library folder of the desktop
app (a library file as it is; a document's swatches or a library loaded from `data` or `dataBase64`
as `.vcswatches`; a library with pattern swatches is refused, since a `.vcswatches` file can't hold them) under a name no file there has, and lists it as User Defined from then on; until the app
quits, commands given its loaded id use the copy → `{library, name, count, path, copied}` (`copied: false`
as `.vcswatches`; a library with pattern swatches is refused) under a name no file there has, and lists it as User
Defined from then on; until the app quits, commands given its loaded id use the copy → `{library, name, count, path, copied}` (`copied: false`
when the folder already held the same file). Without a user library folder the command is disabled.
These commands refuse a parameter of the wrong form with an error that names it: `library`, `apply`, `path`, `data`,
`dataBase64`, `format` and `name` must be strings, `names` must be a list of names, and `focus`, `replace` and `user`
+1 -1
View File
@@ -1862,7 +1862,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
A symbol instance written as its art, and a blend, mesh, repeat, placed document, intertwine or envelope written as a group of its art, likewise still wraps area type by its bounds when the file is opened, as it did before saving, not by the members of that art: the group starts with the same unpainted rectangle, which takes the object's lock and visibility, and the group keeps the object's name and transparency without options of its own. Area type in that art is above the rectangle, so the rectangle does not wrap it. The rectangle takes its place in the object limit before the art; without room for it, the options are left out with the limit's warning. An object without finite bounds keeps the options on its group. This is VectorCraft's own round-trip rule (`crates/eps/src/ai_editing/tests.rs` `live_art_written_as_a_group_keeps_wrapping_by_its_bounds`, `wrap_bounds_of_live_art_fit_the_object_limit_and_leave_area_type_in_the_art_unwrapped`, `live_art_without_bounds_keeps_its_text_wrap_on_the_group`).
In a `.ai` or EPS opened from its editing data, type has its text object's opacity, blend mode and knockout shape flag, whether it is made from the file's text document or taken from the page, and type made from the text document takes its text object's lock. Where such type has transparency and comes in with other art (the rest of its look, or page type and strokes that go with it), a group of them has it. Where the page draws its type, or the strokes around it, with transparency that is neither its text object's nor its text object's combined with that of the objects around it, the page's type and strokes keep their own instead (`crates/eps/src/import/tests_native.rs`). Where the page draws type of no text object over text objects made from the text document, with their words in any case, that type is theirs as the page draws it and is left out; the page's other type of no text object goes only to text objects whose type the text document can't make, or else is left out with a warning.
`.ai` editing-data import restores the document's listed graphic styles in panel order and links objects that use a listed style; unsupported appearances keep their drawn look (`crates/eps/src/import/ai/tests.rs`).
Swatches › Open Swatch Library › Other Library… lists `.ai` and `.eps` files in its Swatch Libraries filter and loads another document's swatches ([importing swatches from another document](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=134)): its colors, tints, gradients and pattern swatches, in its order and color groups. Adding a pattern swatch from such a library brings the pattern with its tile and art as a pattern swatch, under the library swatch's name and in its color group. A file with no swatches, and a `.ai` or EPS whose swatches are only the default ones, are refused with a message (`cmd::fileio::tests_aiimport::a_swatch_library_in_a_ai_file_lists_and_adds_its_pattern_swatches`, `a_pattern_from_a_ai_library_keeps_a_color_the_library_lacks`, `swatch_library_files_without_swatches_or_damaged_are_refused`, `cmd::fileio::tests::the_swatch_library_filter_lists_ai_and_eps_files`).
Swatches › Open Swatch Library › Other Library… lists `.ai` and `.eps` files in its Swatch Libraries filter and loads another document's swatches ([importing swatches from another document](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=134)): its colors, tints, gradients and pattern swatches, in its order and color groups. Adding a pattern swatch from such a library brings the pattern with its tile and art as a pattern swatch, under the library swatch's name and in its color group. A document with no swatches, and a `.ai` or EPS whose swatches are only the default ones, are refused with a message (`cmd::fileio::tests_aiimport::a_swatch_library_in_a_ai_file_lists_and_adds_its_pattern_swatches`, `a_pattern_from_a_ai_library_keeps_a_color_the_library_lacks`, `swatch_library_documents_without_swatches_or_damaged_are_refused`, `cmd::fileio::tests::the_swatch_library_filter_lists_ai_and_eps_files`).
A `.ai` or EPS graphic style library, whose editing data holds the styles and their list but no layers, opens with those styles in list order. Other Library… loads another document's graphic styles ([Apply graphic styles](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/apply-graphic-styles/apply-graphic-styles.html)) and lists such a library's styles in a library panel. A `.ai` or EPS read as its PDF part or page because its layers can't be used also gets the styles of its list in place of the default ones (`crates/eps/src/import/tests_native.rs`, `cmd::fileio::tests_aiimport::a_graphic_style_library_in_a_ai_file_without_layers_loads_its_styles`).
A `.ai` or EPS symbol library, whose editing data holds symbol definitions and their list but no layers, opens with those symbols in list order, each with its registration point. Other Library… in the Symbols panel's Symbol Libraries Menu imports the symbols of the file you pick ([Create or import symbol libraries](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-or-import-symbol-libraries.html)) and lists such a library's symbols in a library panel. A `.ai` or EPS read as its PDF part or page because its layers can't be used also gets the symbols defined before its layers (`crates/eps/src/import/tests_native.rs`, `crates/eps/src/import/ai/tests.rs`, `cmd::fileio::tests_aiimport::a_symbol_library_in_a_ai_file_without_layers_loads_its_symbols`).
In a large canvas `.ai` or EPS ([Large canvas FAQ](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/start-a-new-file/large-canvas-faq.html)), or a `.ai` whose page is in larger units, opened from its editing data, VectorCraft reads the symbol definitions in the same units as the layers. When the file opens at its full size, each symbol's art, strokes and effects are scaled with the layers, and each instance keeps its own scale and rotation and draws where and as large as before. A new instance comes in at the symbol's full size, the size of an instance at 100% in the file. A symbol library from such a file comes in at the same size, and opacity masks on the layers that don't move with their object are scaled with the layers too. Editing data that VectorCraft wrote keeps its symbols and those masks at their own size, as its `.ai` save writes them (`tests_native::a_large_canvas_eps_keeps_its_symbols_at_the_pages_size`, `a_large_canvas_ai_keeps_its_symbols_at_the_pages_size`, `a_large_canvas_ai_vectorcraft_wrote_keeps_its_symbols_at_their_own_size`, `a_symbol_library_in_larger_units_comes_in_at_the_pages_size`, `build::candidate_tests::scaling_the_symbols_keeps_their_instances_in_place`, `scaling_a_read_document_scales_unlinked_opacity_masks`).