mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:51:05 +01:00
Swatch libraries: swatches a pattern brings skip the library's numbered names
Add to Swatches now passes the clipboard importer the library's numbered
swatch names that a picked pattern's swatches and patterns can come in
under. A swatch or pattern that the import brings under a numbered name
skips those names. This replaces the placeholder and copy swatches that
held the names around the import. Paste and Use Library Item pass none
and number swatches as before.
- A tint or gradient of a numbered library name that the art brings,
such as a tint "Ink 2" of "Ink", keeps that name. Before, in a
document with another "Ink", the art's "Ink" came in as "Ink 2", the
tint as "Ink 2 2", and adding the library's "Ink 2" next added it
again.
- A swatch of a numbered library name that the document does not use
comes in under that name instead of as the document's identical copy
("Ink 2 2"). A copy of it that the import already brought is not
reused for another library color of the same paint.
- Of two library swatches with one numbered name, the first one in the
library keeps the name when the other is a swatch the art brings or a
pattern swatch.
- A pattern that the art is painted with, and its swatch, skip the
library's names when they come in numbered. A pattern of a numbered
name whose library swatch places it otherwise keeps its name, and the
swatch that comes with it gets another, so adding the library swatch
next finds its name free.
- A pattern swatch's numbered name skips the library's names, as a
color's does, and a pattern swatch takes the library swatch's name
when it is free, also when its pattern is reused.
- A pattern pasted into the document is still found: when skipping the
names would add the pattern again, or would reuse it only by merging
colors, an import that does not skip them is used if it reuses the
pasted pattern and gives none of those names to another swatch.
- The paint and kind check on the colors a pattern's art brings or
takes has a test: a library whose spot "Ink" shares its name with a
global "Ink" in a color group, so that the art brings both.
docs/mcp.md is rewrapped and says that a library color is numbered
beside a document color of the same name and paint of another kind
(process, global or spot), not only beside a process color. The params
text of swatch.library.add, docs/mcp.md and the docs/target-app-parity.md
line describe these rules and name their tests.
This commit is contained in:
1 parent
1cf0a2806a
commit
f6bbab4b6e
7 files changed
+981
-110
No files matched your search
+22
-15
@@ -5833,21 +5833,28 @@ From a document, such as a `.ai` or `.eps` swatch library, it reads the colors,
|
||||
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 global or spot
|
||||
color the pattern's art links to keeps the library's color: when the document gives its name another color, it comes
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. That numbered name skips the names the library
|
||||
gives its other swatches. 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 already holds with its art linked to the document's own color of that name
|
||||
is used as it is. 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 copy, links to that copy, whether the color is picked before or after it, was added
|
||||
earlier or came with a pattern's art. A library global color is not the document's process color of the same name and
|
||||
paint: it comes in numbered. A global or spot color that a library tint or gradient links to and the document lacks
|
||||
comes in with the tint or gradient, under a numbered name when the document gives its name another swatch. The
|
||||
document's tint or gradient of the library one's name is that swatch when it links to the copy of the color that the
|
||||
art of a pattern picked with it takes; a numbered copy that the library also names stands for that library swatch
|
||||
otherwise. When the document's tint or gradient links to a color the document no longer has (deleted without
|
||||
unlinking), that color comes back under its own name. A pattern is found again when it was pasted with Add or Merge for all of its colors; one pasted
|
||||
with Merge for some colors and Add for others is added again as a copy. `added` lists the colors the pattern's art, a
|
||||
tint or a gradient brings too. A document with
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. That numbered name, and the numbered names of a
|
||||
pattern swatch and of a pattern the art is painted with, skip the names the library gives its other swatches. A swatch
|
||||
of a numbered library name, such as a color or tint "Ink 2", that the pattern's art brings keeps that name when the
|
||||
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
|
||||
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
|
||||
copy, links to that copy, whether the color is picked before or after it, was added earlier or came with a pattern's
|
||||
art. A library global or spot color is not the document's color of the same name and paint when that color is of
|
||||
another kind (process, global or spot): it comes in numbered. A global or spot color that a library tint or gradient
|
||||
links to and the document lacks comes in with the tint or gradient, under a numbered name when the document gives its
|
||||
name another swatch. The document's tint or gradient of the library one's name is that swatch when it links to the
|
||||
copy of the color that the art of a pattern picked with it takes; a numbered copy that the library also names stands
|
||||
for that library swatch otherwise. When the document's tint or gradient links to a color the document no longer has
|
||||
(deleted without unlinking), that color comes back under its own name. A pattern is found again when it was pasted
|
||||
with Add or Merge for all of its colors; one pasted with Merge for some colors and Add for others is added again as a
|
||||
copy. `added` lists the colors the pattern's art, a tint or a gradient brings too. 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", unless the document has graph designs: it then loads with no swatches. The
|
||||
Swatch Libraries filter of Other Library… lists `.ai`, `.ait` and `.eps` (`.epsf`) files as well as the library files.
|
||||
|
||||
@@ -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. Use Library Item adds a library pattern's colors the same way (`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_color_a_pattern_brings_skips_the_librarys_numbered_names`, `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. 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. Use Library Item adds a library pattern's colors the same way (`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_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`).
|
||||
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`).
|
||||
|
||||
Reference in new issue
Block a user