Commit Graph
9093 Commits
Author SHA1 Message Date
BFlat 623164ad5b Merge pull request #6141 from dotCooCoo/feat/text-styles-load-from-document
Text styles: load character and paragraph styles from another document
2026-11-08 14:14:59 +08:00
BFlat a2a3c06f3c Merge pull request #6133 from dotCooCoo/fix/ai-warped-type-compare
.ai import: warped type that draws differently from the file opens as its drawn art
2026-11-08 14:14:43 +08:00
BFlat 8ae6f15903 Merge pull request #6130 from dotCooCoo/feat/smooth-color-step-count
Blend: Smooth Color counts a step per level of color change
2026-11-08 14:14:26 +08:00
BFlat 4e1d1ab8c6 Merge pull request #6129 from dotCooCoo/fix/colormgmt-params
Color management: commands reject a param of the wrong type
2026-11-08 14:14:10 +08:00
BFlat 8dab326d41 Merge pull request #6127 from dotCooCoo/fix/flatten-region-limit-early
Flattening: stop building a group's regions at the first one past the region limit
2026-11-08 14:13:55 +08:00
BFlat 1a28f998cc Merge pull request #6126 from dotCooCoo/fix/issue-6110
Fix #6110: pattern brush corner tiles line up with the side tiles
2026-11-08 14:13:44 +08:00
BFlat d7acf687e9 Merge pull request #6124 from dotCooCoo/fix/envelope-params
Envelopes: commands reject a style, orientation or preserveShape of the wrong type
2026-11-08 14:13:33 +08:00
BFlat 2c442f642c Merge pull request #6122 from dotCooCoo/feat/linesweeper-craft-libs
Build: linesweeper from craft-libs' vendored copy at 481f66d
2026-11-08 14:13:15 +08:00
BFlat 45d31fc197 Merge pull request #6120 from dotCooCoo/fix/relative-paths-nested-links
Links: links inside symbols, patterns and masks follow a moved folder and are updated like links in the layers
2026-11-08 14:13:00 +08:00
BFlat 9e8bfd87f9 Merge pull request #6119 from dotCooCoo/feat/trace-preset-buttons
Image Trace: buttons above the Preset menu choose the Auto Color, High Color, Low Color, Grayscale, Black and White and Outline presets
2026-11-08 14:12:45 +08:00
BFlat 0199dd10ca Merge pull request #6118 from dotCooCoo/feat/artboard-fade-outside
Artboard Options: Fade Region Outside Artboard darkens the area outside the artboards
2026-11-08 14:12:29 +08:00
BFlat b8884e40c4 Merge pull request #6116 from dotCooCoo/fix/type-find-params
Type: find and replace and Type menu commands reject a param of the wrong type
2026-11-08 14:12:13 +08:00
BFlat 5c4efaa515 Merge pull request #6114 from dotCooCoo/fix/ai-legacy-rksj-text
.ai import: legacy type in CJK fonts decodes by the font's CMap
2026-11-08 14:11:58 +08:00
BFlat e0f2c98e1f Merge pull request #6108 from dotCooCoo/feat/recent-colors-30
Color: Recent Colors keeps the last 30 colors used, across documents
2026-11-08 14:11:43 +08:00
BFlat 57c7fc24ee Merge pull request #6090 from dotCooCoo/feat/control-bar-dock
Control bar: the panel menu and the gripper dock it to the top or the bottom of the window
2026-11-08 14:11:27 +08:00
dotCooCoo cbe374df62 Text styles: loading imports once and reads the brush library once
charStyle.load, paraStyle.load and textStyle.loadAll imported the styles
into a copy of the document to see whether anything changed, then ran the
same import again inside the edit. The edit now takes the copy the first
import made. While a typing session is open the import still runs inside
the edit, because the edit ends the session first and that can change the
document.

Matching a loop of definitions parsed the document's brush library again
for every comparison, and placing brushes in use order parsed it again for
every brush. Each now reads it once.

The params text and docs/mcp.md now say that the symbols and brushes the
patterns use come along, that `skipped` lists names in the file, and that
charStyle.load and paraStyle.load list only the styles of their own kind.
2026-11-08 12:59:34 +07:00
dotCooCoo ea3fe16896 Text styles: loading uses a loop the document has under the names found for it
When the document has a loop of styles and patterns under one set of names, its styles
were still matched one by one, so a style could be matched to another copy with the same
attributes and the pattern then compared with the wrong style name. Each definition of
such a loop is now the document's under the name found for it.
2026-11-08 12:59:34 +07:00
dotCooCoo 127251f297 Keyboard Shortcuts: the text style loaders are listed only with a key of their own
charStyle.load, paraStyle.load and textStyle.loadAll need a file, which their panel menu
items ask for, so a key press without one reports a missing param. They join the library
loaders that Edit > Keyboard Shortcuts lists only when a key was saved for them.
2026-11-08 12:59:34 +07:00
dotCooCoo 63e8e765ac Text styles: loading places brushes in use order with styles and patterns
A brush whose art sets type in a style renamed on the way in was compared before the
rename was known, so loading the file again added the brush and what uses it again.
Loading now places brushes with the styles, symbols and patterns, each after what it uses.
Paste keeps its order.
2026-11-08 12:59:34 +07:00
dotCooCoo b31ad2c537 Text styles: loading adds every style and pattern of a loop the document lacks
A style that paints with a pattern whose type is set in that style could be matched to the
document's style of the same name and attributes while the pattern came in under a free
name, so the loaded style painted with the document's other pattern. When the document does
not have such a loop under one set of names, each of its styles, symbols and patterns is now
added.
2026-11-08 12:59:34 +07:00
dotCooCoo 089d6c3e74 .ai import: warped type in a file with artboards is compared on the first artboard
The page that warped type is compared with was read after the artboard
list had been moved into the document, so a file with an artboard list
fell back to its crop marks or its art's box. The page is now read
before the list is moved.
2026-11-08 12:59:33 +07:00
dotCooCoo 4abf9f4081 Text styles: loading matches a long loop of patterns that use each other
The names a loop of styles and patterns has in the document were searched by trying every
combination, up to 256, so a loop of nine with a numbered copy each was not matched and a
repeat load added it again. The names are now picked one definition at a time, comparing each
definition as soon as the names of those it uses are picked.
2026-11-08 12:59:33 +07:00
dotCooCoo 7036d44603 .ai import: warped type bound to a text variable stays type
Warped type that a text variable binds stays type with the effect live,
so it keeps its binding. Before, a failed comparison replaced it with
its drawn art and the binding was skipped.

When drawn art replaces warped type with a wrap setting, the wrap shapes
are checked against the file's limit on wrap work again, so a file whose
drawn art would go past it opens from its page, as one with too many
text objects does.
2026-11-08 12:59:33 +07:00
dotCooCoo 8f14e2f0ec Text styles: loading skips a style whose sizes or scales are out of range
A loaded character style kept a size, scale, leading, shift or stroke width that
charStyle.new refuses. Such a style is now skipped and listed in the reply's skipped names.
2026-11-08 12:59:33 +07:00
dotCooCoo dfb507b7b7 Text styles: a loaded style's pattern brings the styles of either kind its type uses
Load Character Styles and Load Paragraph Styles left out every style of the other kind,
so a pattern that a loaded style paints with kept a reference to a paragraph or character
style the document did not get. The styles of the kind not loaded now come along when such a
pattern or symbol sets type in them, renamed like any other.

The order in which styles, symbols and patterns are placed is worked out from one graph of
their uses instead of scanning every definition left in each round.
2026-11-08 12:59:33 +07:00
dotCooCoo c168302fec Text styles: match each loop of patterns that use each other on its own when loading styles
Loading styles placed every definition in a loop of uses, and everything that used one, in one group and tried the product of all their candidate names under one cap of 256. Separate loops multiplied: nine self-referencing patterns, each in the document under its name and as a numbered copy from an earlier load, gave 512 combinations, none were tried, and a repeat load added more numbered copies. One loop with no candidate stopped every other loop from matching.

The loops are now the strongly connected components of the uses among those definitions. Each loop is matched with its own search and cap, and a definition that only uses a loop is placed after it, with the loop's names known.
2026-11-08 12:59:33 +07:00
dotCooCoo d8187b4967 Text styles: load character and paragraph styles from another document
The Character Styles and Paragraph Styles panel menus get Load Character
Styles... or Load Paragraph Styles..., and Load All Styles..., which add the
styles of a document picked in an open dialog in one undo step
(charStyle.load, paraStyle.load, textStyle.loadAll). The swatches,
patterns and symbols the styles use come along as Paste brings them, in
use order, so a style or pattern renamed on the way in keeps its links.
A style the document already has, under its name or a numbered copy of
it, is not added again; another style whose name is taken is added under
a free name. The file's Normal styles, and styles with a blank name or
attributes that do not read, are not loaded.
2026-11-08 12:59:33 +07:00
dotCooCoo 888bf32f82 Blend: Smooth Color counts a step per level of color change
Smooth Color now counts the steps between each pair of keys from the
keys' colors and visible bounds, which changes the step count of most
Smooth Color blends. The counts are VectorCraft's own values:

- When the keys' solid fills or strokes differ (in groups, member by
  member; in text, run by run), the count is 255 times the largest
  change of one channel as a fraction of its range, a half step
  rounding down, from 1 to 254. An RGB channel's range is 256 values,
  CMYK and gray count in percent, and two tints of one swatch by their
  tints. It is at most eight per point of the largest of the keys'
  widths and heights and the distance between their centers. Black to
  white was 128 steps and is now 254.
- When the colors match, a solid paint meets no paint, or a key holds
  a gradient or a pattern, the count is the largest distance between
  corresponding visible bounding-box edges divided by the keys' mean
  width or height, rounded, less one, from 1 to 1000. Two 20 pt
  squares 200 pt apart were 100 steps and are now 9.

Keys without bounds make the color count when their colors differ,
and 1 step otherwise.

A blend nested in another blend's keys counts toward the step limit
by its color steps when its colors differ, and as up to 1000 steps
when they match (256 before). An outer blend of 200 steps between two
such same-color Smooth Color blends now draws 99 steps.

A Smooth Color blend in an .ai file whose drawn steps follow this rule
now opens as a live blend.

Blend Options: https://web.archive.org/web/20241217212108/https://helpx.adobe.com/illustrator/using/blending-objects.html
Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:59:32 +07:00
bflatastic 612682970f i18n: keep one Turkish row for each message 6129 touches 2026-11-08 12:59:32 +07:00
dotCooCoo d54d4657b9 .ai import: warped type that draws differently from the file opens as its drawn art
A Warp on type, on the object or on one of its fills or strokes, opened
as a live effect with no check. Where the live warp draws a different
shape from the art saved in the file, the type moved and changed size.

Warped type is now compared with its saved art once it is laid out,
with the comparison and the per-file budget that envelopes use. Type
that draws as its saved art stays editable with the effect live. Other
warped type opens as that art, not as editable type, with one note that
counts them, and saving over the file asks first. The art's box goes
back into the comparison with the page. Type stays live without a
comparison when its saved art paints nothing or draws type of its own,
and in frames of threaded type.
2026-11-08 12:59:32 +07:00
dotCooCoo badda0a16e Color management: color.gamutCheck names colors when it is not a list
A non-null `colors` that is not an array now gives "`colors` must be an array of colors, not ..." instead of the generic "bad color ...", with a row in every catalog. The loadProfile and removeProfile refusal tests also check that no profile is loaded or removed and the settings are unchanged.
2026-11-08 12:48:01 +07:00
dotCooCoo 56ad84266d Color management: color.gamutCheck rejects a colors param that is not a list
A colors value that is not an array, such as "#fff" or 5, was ignored and the command checked the selection or the whole document instead. It is now an error. A null colors still checks the selection or document, as an omitted one does.
2026-11-08 12:48:00 +07:00
dotCooCoo 8901877e40 Color management: commands reject a param of the wrong type
The color management commands read their params with helpers that fell
back to the default for a value of the wrong type, so "bpc": "no" kept
the old setting, "on": "true" toggled the view and "convert": "no"
converted the colors. They now go through switch_or and text_param:
such a value is an error and nothing changes. Omitting a param or
giving null keeps its default.

- edit.colorSettings: rgb, cmyk, intent, bpc
- file.documentColorMode (and its alias): convert, intent, grays,
  checked before the early return for the current mode; PDF import's
  grays reads the same way
- color.convert: to, intent
- color.loadProfile: path; color.removeProfile: name
- view.proofSetup: target, intent, simulatePaper, proof
- view.proofColors and view.overprintPreview: on
- view.separationsPreview: on, only, toggle, and plates, which must be
  an array of plate names
- swatch.setSpot: name, spot
2026-11-08 12:48:00 +07:00
dotCooCoo 96252edb74 Flattening: stop building a group's regions at the first one past the region limit
With an unclipped raster/vector balance between 0 and 100, a group that
splits into more than 10^(balance/20) regions is rasterized whole and
none of its regions are used. The region build now stops at the first
region past that limit (pathops `regions_within`) instead of building
every region and then discarding them. Groups at or under the limit,
and every group with Clip Complex Regions on, still build every region.

Flatten Transparency, the flattened document and EPS export come out
the same as with every region built, for groups under the limit, at it,
just over it and far over it.
2026-11-08 12:47:59 +07:00
dotCooCoo 5ccb73c6bb Fix #6110: pattern brush corner tiles line up with the side tiles
A corner tile was turned so that its x axis followed the mean of the
directions the path arrives and leaves in. A tile drawn as a right-angle
corner then came out turned 45° at every corner, so a rectangle drew its
corners as diagonal chevrons.

Outer and inner corner art are now both read as the corner that joins a
side tile on its right to one below it, as in the help's steps for
making corner tiles. Each corner tile is turned so that those two arms
meet the sides: on a rectangle the tile is square to the side tiles and
turns 90° from one corner to the next, and at other angles it is turned
halfway between the two sides. The arms follow Flip Along and Flip
Across, and a corner that takes the other kind's art turns it the same
way. Which art each corner takes is unchanged.

The PatternBrush field docs, the brush.options params text, docs/mcp.md
and the progress doc describe how corner art is drawn.
2026-11-08 12:47:59 +07:00
dotCooCoo 4fddf66d2c Envelopes: commands reject a style, orientation or preserveShape of the wrong type
object.envelope.makeWithWarp, resetWithWarp and options read `style`
and `orientation`, and options read `preserveShape`, as text and
ignored any other value, so `{"style": 5}` kept the default style and
`{"orientation": "diagonal"}` kept the current orientation. They now
return "`style` must be a string" or "`preserveShape` must be a
string" for a value other than text or null, and "`orientation` must
be one of horizontal, vertical" for any other orientation, through
the shared `choice` helper. object.envelope.options checks the warp
keys whatever is selected, so a call with no envelope or only mesh
envelopes selected gets the same errors, an unknown style name
included. Omitted and null values keep today's defaults.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:59 +07:00
dotCooCoo f416fc49ef Build: linesweeper from craft-libs' vendored copy at 481f66d
The workspace patches linesweeper to storytold/craft-libs at 481f66d, the
merge of craft-libs#633, which keeps the crates.io 0.5.0 package in
vendor/linesweeper. Fixes made to that copy reach VectorCraft when the
rev moves. Cargo.toml still asks for linesweeper 0.5.

The library is unchanged: Cargo.toml and every file under src/ in the
copy are byte-identical to the crates.io 0.5.0 package, whose sha256 is
a25df1b0c5432893f41bba817150e323703ee5f6d974f3a6808ac7fd7f046d18, the
checksum Cargo.lock carried. Cargo.lock changes only linesweeper's
source and checksum lines.

NOTICE no longer lists linesweeper among the crates fetched through
crates.io, and names the craft-libs revision it comes from.
2026-11-08 12:47:58 +07:00
dotCooCoo 98731894ec Links: a nested link follows its moved file whatever else its link holds
On open, a link found away from its path was passed to the same file's links in symbols, graph designs, patterns and opacity masks only when the nested link equaled the layers' link field for field. A nested link without a relative path, as documents saved before kept them, then kept the old path. The new path now goes to every nested object that shows the same file and content.
2026-11-08 12:47:58 +07:00
dotCooCoo 729d8d5184 Links: Update Links reads files again for links inside symbols, patterns and masks
Update Links, and opening a document with Update Links: Automatically,
now read a modified file again for the images and placed documents in
symbols, graph designs, patterns and opacity masks that show the same
content as the objects read in the layers. By default Update Links also
reads the files that only that art shows. Each nested object takes the
file's place as its own Placement Options say, including the clip, and
its link takes the new path, size, modification time and hash.

Saving a document also refreshes the placed copies of it inside symbols,
graph designs, patterns and opacity masks of the other open documents,
not only those in the layers.

Relink, Embed and Unembed still change only the objects they are given.
2026-11-08 12:47:57 +07:00
dotCooCoo acb6b880d5 Links: links inside symbols, patterns and masks are saved with relative paths
A save wrote the path relative to the document only for linked images and
placed documents in the layers. Links inside symbols, graph designs,
patterns and opacity masks kept only their absolute path, so after the
document and its files moved to another folder together, those files were
not found.

- The save sets the relative path of every link the document holds.
- On open, a link inside that art whose file was found away from its path
  takes the new path, as a link in the layers does, so the next save
  writes the right relative path.
- Document::update_links_where changes only the links it picks and copies
  only the nodes on the way to them.

Docs: docs/mcp.md (Linked images), docs/target-app-parity.md.
2026-11-08 12:47:57 +07:00
dotCooCoo 8d3a64453a Image Trace: buttons above the Preset menu choose the Auto Color, High Color, Low Color, Grayscale, Black and White and Outline presets
Six buttons above the Image Trace panel's Preset dropdown choose a preset as the dropdown does:
Auto Color chooses Auto Color, High Color chooses High Fidelity Photo, Low Color chooses Low
Fidelity Photo, Grayscale chooses Shades of Gray, Black and White chooses Black and White Logo,
and Outline chooses Outline. With Preview on, a click traces the selected Image Trace object again
as one undo step; with nothing traced selected, it changes the panel's settings only. The button of
the panel's preset shows as selected, and its tooltip names the preset.

The help page lists these options before Preset:
https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/image-trace-panel-options.html
Which preset each button chooses is VectorCraft's own.

High Color and Low Color get rows in every catalog.
2026-11-08 12:47:56 +07:00
dotCooCoo 12da9ef677 Artboard Options: the fade covers the box around crossing artboards when they would leave too many rectangles 2026-11-08 12:47:55 +07:00
dotCooCoo cdf42d5ab5 Docs: Fade Region Outside Artboard lines name Presentation Mode and the new tests 2026-11-08 12:47:55 +07:00
dotCooCoo 92d3505529 Artboard Options: Presentation Mode draws no fade, and the fade's rectangles stay few for many artboards
The fade outside the artboards is no longer drawn in Presentation Mode, which shows only the art, even when the Artboard tool is active.

The rectangles that make up the fade are now merged down from band to band when a gap keeps the same left and right edges, and the bands are swept with the boards sorted by their top edge. A row of 200 top-aligned artboards of different heights now gives at most 600 rectangles instead of about 20,000.
2026-11-08 12:47:55 +07:00
dotCooCoo e620da7ed6 Artboard Options: the fade covers art outside the artboards and OK sets the Global checkboxes after the artboard
With Fade Region Outside Artboard on, the canvas now draws the fade over the
art as well as the pasteboard: one mesh of black at 40% opacity covers the
canvas outside the artboards, so the pasteboard and any art on it show each
channel at 60% of its value, and art inside an artboard is unchanged. It
replaces the darker pasteboard fill.

Artboard Options sets the Global checkboxes' preferences only after
artboard.setProps or artboard.new succeeds. When the artboard command
refuses a value, the preferences stay as they were and the dialog stays
open. A Global value that is not true or false is refused before anything
changes.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:54 +07:00
dotCooCoo e5ddabf51f Type: find and replace and Type menu commands reject a param of the wrong type
Find and Replace, Find Next, Change Case, Smart Punctuation, Insert
Character and Type on a Path Options read their params with helpers that
fell back to the default for a value of the wrong type: Find and Replace
with `replace: 5` replaced every match with nothing, and `flip: "true"`
did not flip. They now return an error and leave the document, the
selection and the undo history unchanged:

- `find`, `replace`, `case`, `char`, `text`, `unicode`, `effect` and
  `alignToPath` must be a string or null.
- `matchCase`, `wholeWord`, `dashes`, `ellipsis`, `quotes` and `flip`
  must be true, false or null.
- Smart Punctuation's `scope` must be `selection` or `document`.
- Type on a Path Options' `spacing` must be a number or null.
- Insert Character's `code` must be a whole number or null.
- Find and Replace's `ids` must be a list of existing object ids.

Insert Character checks `char`, `text`, `code` and `unicode` before it
picks one, so `{"char":"bullet","unicode":176}` is refused too. The
order the sources are used in is unchanged. Null counts as left out, so
`type.insert {code: null, unicode}` inserts the Unicode character.
Omitted params keep their defaults.
2026-11-08 12:47:53 +07:00
dotCooCoo 1063f5090a Artboard Options: Fade Region Outside Artboard darkens the pasteboard while the Artboard tool is active
Artboard Options gets a Global group with Fade Region Outside Artboard and
Update While Dragging. Both are application preferences
(fadeRegionOutsideArtboard, artboardUpdateWhileDragging), on by default and
also listed under Preferences > General > Artboard Options.

While the Artboard tool is active, the canvas draws the pasteboard with each
color channel at 60% of its value. With Update While Dragging off, the
pasteboard draws as usual while the tool moves or resizes an artboard and
darker again when the drag ends. Exports and print do not change.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:53 +07:00
dotCooCoo 81a7a68388 .ai import: legacy type in CJK fonts decodes by the font's CMap
Legacy type in a composite font such as HeiseiMin-W3-83pv-RKSJ-H was
decoded one byte to a character, so Japanese, Chinese and Korean type
opened as unrelated single-byte characters, and the font name kept the
CMap.

Tf now finds a predefined CMap at the end of the font name, unless a TZ
gives the font encoding pairs, and the font is the name without it.
Strings in that font are read by the CMap's code space, mapped to CIDs
with the predefined CMaps craft-pdf carries, then to Unicode by the
character collection's CID-to-Unicode CMap. Codes the CMap doesn't map
are dropped. A -V CMap is read with its -H form's codes. Codes in the
Unicode CMaps (UCS2, UTF8, UTF16, UTF32) are read as Unicode; those
helpers follow mockydevs' #6067. A 0x0D byte ends a paragraph and a 0x09
byte is a tab in these fonts too.

The predefined CMaps craft-pdf doesn't carry (RKSJ, 78-RKSJ, 78ms-RKSJ,
78-EUC, 78, Add, Ext, NWP, GB, CNS1, KSC, B5 and the Hong Kong B5 sets
other than HKscs-B5) are read with the nearest
carried CMap, which can give a different character for some codes.
GBT, GBT-EUC, GBTpc-EUC, CNS2 and KSC-Johab type still decodes byte by
byte, with the CMap removed from the font name.

Docs: docs/file-format-parity.md.
2026-11-08 12:47:52 +07:00
dotCooCoo c32f44ba3a Color: Recent Colors keeps the last 30 colors used, across documents
Recent Colors now keeps up to 30 solid colors instead of 10, newest
first and each once; applying a 31st drops the oldest. The Session
holds the list, so it stays the same when another document is opened
or made active, and it lasts for the session.

The Color and Swatches panels wrap the chips onto further rows when
the panel is too narrow for one row, so every color can be clicked.
A list that fits one row draws as before.

Docs: paint.recent params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-08 12:47:51 +07:00
dotCooCoo 19fd8d1d5e Control bar: the panel menu and the gripper dock it to the top or the bottom of the window
Squashed from #6090 onto main.
2026-11-08 12:47:51 +07:00