Swatch libraries: a nested pattern's swatch keeps its free library name

A pattern that a library pattern's art is painted with, whose numbered
name ("Inner 2") the document gives another pattern, came in as
"Inner 2 2" with its swatch under that name too, so adding the library's
"Inner 2" swatch next found that swatch and left the name unused. The
swatch now takes the library swatch's name when no swatch or color group
uses it, and still paints the pattern that came in.

A color a library pattern's art brings no longer reuses a numbered copy
whose name the library gives another swatch when the copy is that
swatch, whether or not the art uses that swatch. Before, only a copy of
a swatch the same add brought was left out, so adding the library's blue
"Ink 2" and then a pattern painted with its blue "Ink" linked the
pattern's art to "Ink 2".

The params text, docs/mcp.md and the progress line describe both rules,
and the progress line says that Use Library Item's numbered names do not
skip the library's other names.
This commit is contained in:
dotCooCoo committed 2026-11-22 17:01:51 -08:00
1 parent 185d79b820
commit e30ce7fcdc
5 files changed
+91 -29

No files matched your search

+19 -24
View File
@@ -1445,6 +1445,18 @@ impl Clipboard {
w.name = other;
}
}
// A pattern that comes in under another name than the one reserved for its
// swatch, because a pattern has that name, keeps that name for its swatch
// when no swatch or color group uses it.
let own = name != def.name
&& !d.swatch_name_taken(&def.name)
&& choices.reserved.get(&def.name).is_some_and(|w| w.paint == pattern_paint(&def.name));
if own && d.swatches.last().is_some_and(|w| w.name == name) {
if let Some(w) = d.swatches.last_mut() {
w.name = def.name.clone();
}
out.reserved_named = true;
}
Placed::added(&def.name, name)
});
added_patterns.extend(p.new_name(&def.name));
@@ -1670,19 +1682,13 @@ impl Clipboard {
let conflicts: BTreeSet<String> =
if same_doc { BTreeSet::new() } else { self.conflicts(d, used).into_iter().map(|(w, _)| w.name.clone()).collect() };
let bases: Vec<&Swatch> = self.swatches.iter().filter(|w| is_base(w) && used.has(Res::Swatch, &w.name)).collect();
// The swatches this import brings, for the names reserved for them.
let brought: Vec<&Swatch> = if choices.reserved.is_empty() {
vec![]
} else {
self.swatches.iter().filter(|w| if is_base(w) { used.has(Res::Swatch, &w.name) } else { used.carries(w) }).collect()
};
for w in &bases {
let p = if conflicts.contains(&w.name) && choices.of(&w.name) == SwatchChoice::Merge {
out.merged += 1;
out.merged_swatches.insert(w.name.clone());
Placed::Existing
} else {
let (p, reserved_named) = add_swatch(d, w, w, same_doc, &choices.reserved, &brought, &out.relink);
let (p, reserved_named) = add_swatch(d, w, w, same_doc, &choices.reserved, &out.relink);
out.reserved_named |= reserved_named;
p
};
@@ -1699,7 +1705,7 @@ impl Clipboard {
for def in self.swatches.iter().filter(|w| !is_base(w) && used.carries(w)) {
let mut w = def.clone();
out.relink.paint(&mut w.paint);
let (p, reserved_named) = add_swatch(d, &w, def, same_doc, &choices.reserved, &brought, &out.relink);
let (p, reserved_named) = add_swatch(d, &w, def, same_doc, &choices.reserved, &out.relink);
out.reserved_named |= reserved_named;
out.placed(Res::Swatch, &def.name, &p);
}
@@ -1913,17 +1919,9 @@ pub(crate) fn numbered_name(name: &str) -> bool {
/// in `reserved`. A numbered name in `reserved` ("Ink 2") that `d` does not use is kept for the
/// swatch it is reserved for: that swatch comes in under it, not as a numbered copy of it that `d`
/// has, and another swatch of that name gets a number. A numbered copy in `d` whose name is
/// reserved for another swatch that the import brings (`brought`), and that is that swatch with
/// its links as `relink` gives them, is left to it.
fn add_swatch(
d: &mut Document,
w: &Swatch,
source: &Swatch,
same_doc: bool,
reserved: &BTreeMap<String, Swatch>,
brought: &[&Swatch],
relink: &Relink,
) -> (Placed, bool) {
/// reserved for another swatch, and that is that swatch with its links as `relink` gives them, is
/// left to it, whether or not the import brings that swatch.
fn add_swatch(d: &mut Document, w: &Swatch, source: &Swatch, same_doc: bool, reserved: &BTreeMap<String, Swatch>, relink: &Relink) -> (Placed, bool) {
let same = |n: &str| d.swatch(n).is_some_and(|t| *t == Swatch { name: n.to_string(), ..w.clone() });
let kept = (!same_doc && numbered_name(&w.name) && !d.swatch_name_taken(&w.name)).then(|| reserved.get(&w.name)).flatten();
let (owns, held) = (kept.is_some_and(|o| o == source), kept.is_some_and(|o| o != source));
@@ -1932,11 +1930,8 @@ fn add_swatch(
relink.paint(&mut o.paint);
*t == o
};
let theirs = |n: &str| {
n != w.name
&& copy_of(&w.name, n)
&& reserved.get(n).is_some_and(|o| o != source && brought.contains(&o) && d.swatch(n).is_some_and(|t| is_owner(t, o)))
};
let theirs =
|n: &str| n != w.name && copy_of(&w.name, n) && reserved.get(n).is_some_and(|o| o != source && d.swatch(n).is_some_and(|t| is_owner(t, o)));
let names = || d.swatches_iter().map(|t| t.name.as_str());
let excluded = Cell::new(false);
let found = existing(
+1 -1
View File
@@ -50,7 +50,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Add to Swatches",
["Window", "Swatch Libraries"],
None,
"{library: id or name, names?: [swatch or colour group names in the library] (default: all of it; a group comes as a colour group, a single swatch ungrouped), apply?: \"fill\"|\"stroke\" (also apply the first one to the selection and the defaults, as paint.setFill / paint.setStroke), focus?: true (with apply: false keeps the active proxy)} copy library swatches into the document as one undo step. A swatch the document already has (same name and paint, and for a color the same process, global or spot kind, or a numbered copy of that name with the same color when the name has another color there) isn't added again; a name taken by another swatch gets a number (\"Clay 1 2\"); a tint or gradient whose global or spot color comes in under a numbered name, or is in the document as such a numbered copy, links to that copy; a global or spot color it links to that the document lacks comes in with it. A pattern swatch brings its pattern, as pasting art painted with it does: the same pattern the document has is used, also when its art links to the document's own color of a name, and a name another pattern or swatch has gets a number; a global or spot color its art links to whose name the document gives another color comes in numbered, skipping the names of the library's other swatches, and the pattern links to it; a swatch of a numbered library name that the art brings, such as a tint \"Ink 2\", keeps that name when the document does not use it, and a pattern swatch or a pattern the art is painted with that comes in numbered skips the library's other names too → {library, added: [names in the document, the colors patterns, tints and gradients brought included], existing: [names already there], applied?: name}",
"{library: id or name, names?: [swatch or colour group names in the library] (default: all of it; a group comes as a colour group, a single swatch ungrouped), apply?: \"fill\"|\"stroke\" (also apply the first one to the selection and the defaults, as paint.setFill / paint.setStroke), focus?: true (with apply: false keeps the active proxy)} copy library swatches into the document as one undo step. A swatch the document already has (same name and paint, and for a color the same process, global or spot kind, or a numbered copy of that name with the same color when the name has another color there) isn't added again; a name taken by another swatch gets a number (\"Clay 1 2\"); a tint or gradient whose global or spot color comes in under a numbered name, or is in the document as such a numbered copy, links to that copy; a global or spot color it links to that the document lacks comes in with it. A pattern swatch brings its pattern, as pasting art painted with it does: the same pattern the document has is used, also when its art links to the document's own color of a name, and a name another pattern or swatch has gets a number; a global or spot color its art links to whose name the document gives another color comes in numbered, skipping the names of the library's other swatches, and the pattern links to it, not to a numbered copy that is the library's other swatch of that name; a swatch of a numbered library name that the art brings, such as a tint \"Ink 2\" or a pattern's swatch when its pattern comes in under another name, keeps that name when the document does not use it, and a pattern swatch or a pattern the art is painted with that comes in numbered skips the library's other names too → {library, added: [names in the document, the colors patterns, tints and gradients brought included], existing: [names already there], applied?: name}",
has_doc,
add
),
+65 -1
View File
@@ -1374,6 +1374,7 @@ fn a_library_pattern_swatchs_copy_skips_the_librarys_other_names() {
/// pattern's art painted with both brings both. A library tint of the spot color, picked before
/// the pattern, links to the document's copy of the spot color the art takes, not to the global
/// color the art brings under a numbered name, whether that color has another paint or the same.
/// The library's own spot "Ink 2" is green, so the document's blue "Ink 2" is not that swatch.
#[test]
fn a_library_tint_is_not_linked_to_a_namesake_of_another_kind_a_pattern_brings() {
for global_color in ["#ff0000", "#0000ff"] {
@@ -1384,7 +1385,7 @@ fn a_library_tint_is_not_linked_to_a_namesake_of_another_kind_a_pattern_brings()
fn a_library_tint_skips_a_namesake_the_pattern_brings(global_color: &str) {
let mut s = session();
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "spot": true}));
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#0000ff", "spot": true}));
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#00ff00", "spot": true}));
run(&mut s, "swatch.new", json!({"name": "Ink half", "swatch": "Ink", "tint": 50}));
run(&mut s, "swatch.new", json!({"name": "Crimson", "color": global_color, "global": true}));
let blue = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 3, "height": 6}))["id"].clone();
@@ -1690,6 +1691,32 @@ fn a_color_a_pattern_brings_reuses_a_copy_that_is_not_the_librarys_namesake() {
assert!(is_global(&s, "Ink 2", "#0000ff") && is_global(&s, "Ink 2 2", "#00ff00"), "{r}");
}
/// A library pattern painted with a blue global "Ink", from a library that also has a blue global
/// "Ink 2" the art does not use, added beside the document's red "Ink" after the library's "Ink 2"
/// came in: the art's "Ink" does not reuse the library's "Ink 2" and comes in as "Ink 3".
#[test]
fn a_color_a_pattern_brings_does_not_reuse_another_library_colors_copy() {
let mut s = session();
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "global": true}));
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#0000ff", "global": true}));
let dot = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 6, "height": 6}))["id"].clone();
run(&mut s, "paint.setFill", json!({"swatch": "Ink", "ids": [dot]}));
run(&mut s, "paint.setStroke", json!({"none": true, "ids": [dot]}));
run(&mut s, "select.set", json!({"ids": [dot]}));
run(&mut s, "object.pattern.make", json!({"name": "Tiles", "width": 8, "height": 8}));
run(&mut s, "object.pattern.done", json!({}));
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": "Tiles.vectorcraft"}))["library"].clone();
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#ff0000", "global": true}));
let first = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Ink 2"]}));
assert!(is_global(&s, "Ink 2", "#0000ff"), "{first}");
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Tiles"]}));
assert!(is_global(&s, "Ink 3", "#0000ff"), "{first} {r}");
let links: Vec<Option<String>> = doc(&s).pattern("Tiles").unwrap().art.iter().map(|n| tint_link(&n.appearance.fill_paint())).collect();
assert_eq!(links, vec![Some("Ink 3".to_string())], "{first} {r}");
}
/// A library pattern painted with a blue global "Ink", pasted beside the document's red "Ink" and
/// then left without its color "Ink 2" (deleted without unlinking), is not reused by bringing the
/// library's "Ink" back as "Ink 2" when the library has its own blue "Ink 2": the pattern links to
@@ -1897,6 +1924,43 @@ fn a_nested_pattern_leaves_its_name_to_a_library_swatch_that_places_it_otherwise
}
}
/// A pattern "Inner 2" that a library pattern's art is painted with, brought under a numbered name
/// because the document has another pattern "Inner 2" without a swatch, comes with a swatch under
/// the library swatch's free name "Inner 2": adding the library's "Inner 2" next finds it.
#[test]
fn a_nested_patterns_swatch_takes_the_library_swatchs_free_name() {
let mut s = session();
let dot = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 4, "height": 4}))["id"].clone();
run(&mut s, "select.set", json!({"ids": [dot]}));
run(&mut s, "object.pattern.make", json!({"name": "Inner 2", "width": 6, "height": 6}));
run(&mut s, "object.pattern.done", json!({}));
let tile = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 10, "height": 10}))["id"].clone();
run(&mut s, "paint.setFill", json!({"swatch": "Inner 2", "ids": [tile]}));
run(&mut s, "select.set", json!({"ids": [tile]}));
run(&mut s, "object.pattern.make", json!({"name": "Outer", "width": 12, "height": 12}));
run(&mut s, "object.pattern.done", json!({}));
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": "Outer.vectorcraft"}))["library"].clone();
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
let own = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 9, "height": 9}))["id"].clone();
run(&mut s, "paint.setFill", json!({"color": "#ff0000", "ids": [own]}));
run(&mut s, "select.set", json!({"ids": [own]}));
run(&mut s, "object.pattern.make", json!({"name": "Inner 2", "width": 14, "height": 14}));
run(&mut s, "object.pattern.done", json!({}));
run(&mut s, "swatch.delete", json!({"names": ["Inner 2"]}));
assert!(doc(&s).pattern("Inner 2").is_some(), "the document keeps its pattern");
let first = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Outer"]}));
let paint = doc(&s).swatch("Inner 2").map(|w| w.paint.clone());
assert!(
matches!(&paint, Some(Paint::Pattern { pattern, .. }) if pattern != "Inner 2" && doc(&s).pattern(pattern).is_some()),
"{first} {paint:?}"
);
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Inner 2"]}));
assert_eq!(r["added"], json!([]), "{first} {r}");
assert_eq!(doc(&s).swatch("Inner 2").map(|w| w.paint.clone()), paint, "{first} {r}");
assert_eq!(doc(&s).patterns.len(), 3, "{first} {r}");
}
/// A library with a pattern swatch "Tiles 2" and, in a color group, a swatch of the same name that
/// places the same pattern with an offset: adding the group first leaves the name to the
/// ungrouped swatch, which comes in under it next.
+5 -2
View File
@@ -5839,8 +5839,11 @@ of a numbered library name, such as a color or tint "Ink 2", that the pattern's
document does not use it. Of two library swatches with one numbered name, the first one in the library keeps the name
when the other is a swatch the pattern's art brings or a pattern swatch. A pattern the art is painted with keeps a
numbered name; when the library's swatch of that name places the pattern otherwise, the swatch that comes with the
pattern gets another name. A library color whose name the document gives another color is the document's numbered
copy of the same color when it has one, so adding the pattern and its color again adds nothing. A pattern the document
pattern gets another name. When the document gives that name to another pattern, the pattern comes in under a new
number, and its swatch keeps the library swatch's name when no swatch or color group uses it. A library color whose
name the document gives another color is the document's numbered copy of the same color when it has one, so adding the
pattern and its color again adds nothing; a numbered copy whose name the library gives another swatch, and which is
that swatch, is not a copy of another color, whether or not the pattern's art uses that swatch. A pattern the document
already holds with its art linked to the document's own color of that name, or to a numbered copy of the color as
pasting leaves it, is used as it is, unless using it would give another swatch a name the library uses. A library
tint or gradient whose global or spot color comes in under a numbered name, or is in the document as such a numbered
+1 -1
View File
@@ -2247,7 +2247,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 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`). As VectorCraft's own rule, a global or spot color whose name the document gives another color, added from a library on its own, with a tint or with a pattern's art, comes in under a numbered name that skips the names of the library's other swatches, and adding it again uses that numbered copy; a library tint or gradient links to it, and brings its color when the document lacks it, or when the document deleted it without unlinking the tint. Use Library Item adds a library pattern's colors the same way. With Add to Swatches, a swatch of a numbered library name that a pattern's art brings, a tint or gradient included, keeps that name, and a pattern swatch or a pattern the art is painted with that comes in numbered skips the library's other names too (`tests::swatchlib::adding_a_library_pattern_and_its_color_again_reuses_the_numbered_color`, `a_library_tint_follows_its_color_to_its_numbered_name`, `a_library_tint_added_alone_brings_its_color_beside_a_namesake`, `a_library_tint_picked_before_its_color_follows_it_to_its_numbered_name`, `a_library_gradient_is_not_the_one_a_merged_pattern_brought`, `a_library_tint_whose_color_the_document_deleted_brings_the_color_back`, `a_color_a_pattern_brings_skips_the_librarys_numbered_names`, `a_pattern_bringing_a_color_and_its_numbered_namesake_keeps_the_librarys_name`, `a_numbered_tint_or_gradient_a_pattern_brings_keeps_the_librarys_name`, `a_numbered_color_a_pattern_brings_keeps_its_name_beside_a_copy_of_it`, `a_numbered_library_pattern_keeps_its_name`, `a_library_pattern_swatchs_copy_skips_the_librarys_other_names`, `a_pattern_swatch_named_after_its_numbered_pattern_skips_the_librarys_names`, `a_nested_pattern_a_library_pattern_brings_skips_the_librarys_names`, `a_nested_pattern_does_not_take_a_name_the_library_gives_a_color`, `a_nested_pattern_leaves_its_name_to_a_library_swatch_that_places_it_otherwise`, `a_pasted_pattern_linked_to_a_copy_of_a_numbered_color_is_found`, `a_new_patterns_swatch_takes_the_library_swatchs_free_name`, `a_new_patterns_swatch_of_an_unnumbered_name_is_named_after_its_pattern`, `a_numbered_name_is_kept_for_the_library_swatch_it_names`, `a_color_a_pattern_brings_again_does_not_reuse_a_copy_the_library_names`, `a_color_a_pattern_brings_reuses_a_copy_that_is_not_the_librarys_namesake`, `alike_gradients_a_pattern_brings_keep_their_names_when_their_color_is_renamed`, `a_pasted_pattern_is_not_reused_by_giving_a_librarys_name_to_another_color`, `a_pattern_pasted_with_add_and_with_merge_is_found_as_the_copy_with_its_colors`, `a_grouped_pattern_swatch_leaves_a_numbered_name_to_the_librarys_color`, `a_grouped_swatch_of_a_reused_pattern_leaves_a_numbered_name_to_the_librarys_color`, `a_grouped_namesake_of_a_pattern_swatch_leaves_it_the_name`, `a_pasted_pattern_is_not_reused_by_taking_a_librarys_name`, `a_pasted_pattern_is_not_reused_by_bringing_back_a_librarys_name`, `a_library_tint_is_not_linked_to_a_namesake_of_another_kind_a_pattern_brings`, `a_color_a_pattern_brings_leaves_links_to_a_deleted_color_alone`, `tests::library::a_pattern_item_keeps_its_global_color_when_the_document_has_that_name_in_another_color`).
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`). As VectorCraft's own rule, a global or spot color whose name the document gives another color, added from a library on its own, with a tint or with a pattern's art, comes in under a numbered name that skips the names of the library's other swatches, and adding it again uses that numbered copy; a library tint or gradient links to it, and brings its color when the document lacks it, or when the document deleted it without unlinking the tint. Use Library Item also keeps a library pattern's colors when it adds a copy of one, but its numbered names do not skip the names of the library's other swatches. With Add to Swatches, a swatch of a numbered library name that a pattern's art brings, a tint or gradient included, keeps that name when no swatch or color group in the document uses it, and a pattern swatch or a pattern the art is painted with that comes in numbered skips the library's other names too. A numbered copy whose name the library gives another swatch, and which is that swatch, is not reused for another color (`tests::swatchlib::adding_a_library_pattern_and_its_color_again_reuses_the_numbered_color`, `a_library_tint_follows_its_color_to_its_numbered_name`, `a_library_tint_added_alone_brings_its_color_beside_a_namesake`, `a_library_tint_picked_before_its_color_follows_it_to_its_numbered_name`, `a_library_gradient_is_not_the_one_a_merged_pattern_brought`, `a_library_tint_whose_color_the_document_deleted_brings_the_color_back`, `a_color_a_pattern_brings_skips_the_librarys_numbered_names`, `a_pattern_bringing_a_color_and_its_numbered_namesake_keeps_the_librarys_name`, `a_numbered_tint_or_gradient_a_pattern_brings_keeps_the_librarys_name`, `a_numbered_color_a_pattern_brings_keeps_its_name_beside_a_copy_of_it`, `a_numbered_library_pattern_keeps_its_name`, `a_library_pattern_swatchs_copy_skips_the_librarys_other_names`, `a_pattern_swatch_named_after_its_numbered_pattern_skips_the_librarys_names`, `a_nested_pattern_a_library_pattern_brings_skips_the_librarys_names`, `a_nested_pattern_does_not_take_a_name_the_library_gives_a_color`, `a_nested_pattern_leaves_its_name_to_a_library_swatch_that_places_it_otherwise`, `a_nested_patterns_swatch_takes_the_library_swatchs_free_name`, `a_pasted_pattern_linked_to_a_copy_of_a_numbered_color_is_found`, `a_new_patterns_swatch_takes_the_library_swatchs_free_name`, `a_new_patterns_swatch_of_an_unnumbered_name_is_named_after_its_pattern`, `a_numbered_name_is_kept_for_the_library_swatch_it_names`, `a_color_a_pattern_brings_again_does_not_reuse_a_copy_the_library_names`, `a_color_a_pattern_brings_reuses_a_copy_that_is_not_the_librarys_namesake`, `a_color_a_pattern_brings_does_not_reuse_another_library_colors_copy`, `alike_gradients_a_pattern_brings_keep_their_names_when_their_color_is_renamed`, `a_pasted_pattern_is_not_reused_by_giving_a_librarys_name_to_another_color`, `a_pattern_pasted_with_add_and_with_merge_is_found_as_the_copy_with_its_colors`, `a_grouped_pattern_swatch_leaves_a_numbered_name_to_the_librarys_color`, `a_grouped_swatch_of_a_reused_pattern_leaves_a_numbered_name_to_the_librarys_color`, `a_grouped_namesake_of_a_pattern_swatch_leaves_it_the_name`, `a_pasted_pattern_is_not_reused_by_taking_a_librarys_name`, `a_pasted_pattern_is_not_reused_by_bringing_back_a_librarys_name`, `a_library_tint_is_not_linked_to_a_namesake_of_another_kind_a_pattern_brings`, `a_color_a_pattern_brings_leaves_links_to_a_deleted_color_alone`, `tests::library::a_pattern_item_keeps_its_global_color_when_the_document_has_that_name_in_another_color`).
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`).