Commit Graph
19001 Commits
Author SHA1 Message Date
.CooCoo f77dfbae60 Merge pull request #10354 from dotCooCoo/fix/tool-icon-stroke-width
Icons: draw every tool icon's outline at the same width
2026-12-01 01:51:24 -08:00
.CooCoo 69b1f26ff0 Merge pull request #10377 from dotCooCoo/fix/tool-shortcut-collisions
Shortcuts: a lone Alt over the canvas no longer gives the menu bar the keys
2026-12-01 01:51:18 -08:00
.CooCoo 7e565c3922 Merge pull request #10376 from dotCooCoo/fix/thin-stroke-close-anchors
Render: thin strokes keep smooth curves round where their lines turn sharply
2026-12-01 01:30:30 -08:00
.CooCoo 084c01d031 Merge pull request #10364 from dotCooCoo/fix/halftone-euclidean-elliptical
Vector Halftone: Euclidean and Elliptical dot shapes
2026-12-01 01:22:58 -08:00
.CooCoo 0d450fa20a Merge pull request #10369 from dotCooCoo/fix/shape-builder-freeze
Shape Builder: stop building regions of paths that cross too often
2026-12-01 01:16:11 -08:00
.CooCoo 643529e3ea Merge pull request #10387 from dotCooCoo/fix/pdf-stream-scan-tests
Tests: cover broken hex strings in the stream scan and restricted file fonts
2026-12-01 01:06:03 -08:00
.CooCoo e4eaaabd0b Merge pull request #10352 from dotCooCoo/fix/menubar-padding
Menu bar: a smaller Home button and padding beside each menu title
2026-12-01 01:00:12 -08:00
dotCooCoo 3f21a06bed Tests: cover broken hex strings in the stream scan and restricted file fonts
A hex string broken by a byte that is neither a hex digit nor white space
is no string: the hostile-input scan goes on from the next byte, so a
cross-reference stream after it is still read. A font a PDF carries with
restricted license flags (OS/2 fsType 0x0002) keeps drawing its type, and
a PDF saved from the document draws that type as outlines with the license
warning instead of embedding the font again.
2026-11-30 23:03:07 -08:00
dotCooCoo f1ef1a4e39 Render: a thin stroke takes the corners of its own subpath
A corner in one subpath gave the stroke's join to the lines of a curve
in another subpath that met at the same point, so a miter could be
drawn there instead of a round join. The corners are now kept per
subpath and each subpath of the outline reads only its own.

Test: a curve's outline is the same with and without a second subpath
that has a corner at the curve's start.
2026-11-30 23:02:15 -08:00
dotCooCoo 85ad10feb5 Vector Halftone: Euclidean quadrant uses the shared arc and segment helpers
quadrant() had local closures that repeated ellipse_arc() and segment().
It now calls those helpers, as elliptical_quadrant() does. The geometry
is unchanged.
2026-11-30 22:32:07 -08:00
dotCooCoo 12cb63642e Shortcuts: a lone Alt over the canvas no longer gives the menu bar the keys
Alt is a tool modifier, and pressing and releasing it without a click
moved the keys to the menu bar on Windows and Linux. The next tool
letter then opened the menu with that access key (V opened View, W
Window, T Type) instead of choosing the tool. While the canvas has the
keys, the canvas now takes the lone Alt tap. F10 and Alt with a letter
still open the menus, and a lone Alt in a field or on the bar is
unchanged.
2026-11-30 22:27:55 -08:00
dotCooCoo 69ff74a63b Render: thin strokes keep smooth curves round where their lines turn sharply
Since #9972 a thin stroke along a curve is drawn as lines, and where two
of those lines met at a sharp angle the stroke's own join was drawn
there. Along smooth anchors that sit close together after a bend, or a
curve that bends tightly, the lines turn sharply, so a miter join drew a
spike past the stroke and the smooth curve showed sharp corners on the
canvas. The document's anchors are unchanged; only the drawing was
wrong.

The stroke's join is now drawn only at the path's own corners, where
two segments meet with tangents that are not in line. Where the lines a
curve is drawn with turn sharply they meet with a round join, as the
stroke along the curve itself is round there.

Tests: a bend followed by smooth anchors 0.1 and 1 apart keeps every
outline point within the stroke's width of the curve and covers it;
with long handles the outline matches the curve's own outline away
from its edge; 200 random cubics with a miter join keep their outline
within the stroke's width of the curve.
2026-11-30 22:21:53 -08:00
dotCooCoo bb80cc827c Shape Builder: name sliver drops in the over-cap region note 2026-11-30 21:45:20 -08:00
dotCooCoo 1b59873456 Shape Builder: say the filled areas keep their own cap past the map's
When the sweep cuts the paths into more than SHAPE_BUILDER_MAX_MAP_EDGES
pieces, the Shape Builder falls back to the regions of the filled areas,
which are capped separately. The docs said it then finds no regions.
2026-11-30 21:30:33 -08:00
dotCooCoo 0a4fcb67ae Vector Halftone: Elliptical dots bridge along their length from 40%
Below 50% the Elliptical dot was an ellipse clipped to the cell's
diamond, so from 40% horizontal neighbors met at a single point and at
50% the dot reached the vertical neighbors too. The dot is now an
ellipse as wide as its cell at 40%; past that it is clipped to the
cell's side, which makes a bridge to the next dot, and to a middle-tone
cut line through the quadrant's center, which keeps the short side
apart until 60%. Areas still match the tone.
2026-11-30 21:27:14 -08:00
dotCooCoo 7a46d5ec56 Shape Builder: stop building regions of paths that cross too often
Paths that cross each other many times are cut by the sweep into far
more pieces than they have segments, and building the regions and edges
of those pieces took minutes and gigabytes of memory. 400 circles
stacked nearly on top of each other (1,600 segments) were cut into
about 320,000 pieces, and their map took 60 s and 4.2 GB, enough to
make the whole computer unresponsive.

The Shape Builder now stops after the sweep when it cuts the paths into
more than SHAPE_BUILDER_MAX_MAP_EDGES pieces (twice
SHAPE_BUILDER_MAX_SEGMENTS, what open paths that cross nothing make at
that cap) and finds no regions. The filled-area regions it falls back
to are capped the same way.
2026-11-30 21:19:58 -08:00
dotCooCoo b143f92f3f Vector Halftone: Euclidean and Elliptical dot shapes
Object > Vector Halftone and the live Vector Halftone effect get two
dot shapes that follow the classic spot functions. Euclidean dots are
round in the highlights, meet corner to corner at 50% as a checkerboard
and turn into round holes in the shadows. Elliptical dots are long,
join into chains along their length at 40% and on every side at 60%,
then turn into long holes. Each dot is a vector path whose area is the
cell's tone. The existing Ellipse shape is unchanged.
2026-11-30 20:49:40 -08:00
.CooCoo 84335645da Merge pull request #10335 from dotCooCoo/fix/linked-profile-listing
New Document: Manage Profiles reports a linked profile as unusable
2026-11-30 20:23:26 -08:00
dotCooCoo 183c365eff Icons: draw every tool icon's outline at the same width
The app icon set declared a 1.6-unit stroke, but its own dc-* icons draw
1.5-unit outlines and its Lucide copies draw 2-unit ones. The framework
scales each icon's strokes by the drawn width over the declared width, so
the dc-* icons drew about 6% thinner than the catalog's icons and the
Lucide copies (Pen, Paintbrush, Add and Delete Anchor Point and others)
about 25% heavier, which made the tool rail's outlines uneven.

- Split the table: the dc-* icons stay in the "vectorcraft" set, now
  declared at 1.5, and the Lucide copies move to a "vectorcraft-lucide"
  set declared at 2. icons::register() registers both.
- dc-free-distort drew a 2-unit outline; it now draws 1.5 like the rest
  of its set.
- A test checks that every app icon's outline width equals its set's
  declared width.
2026-11-30 20:09:42 -08:00
dotCooCoo 2030c7b2d2 Menu bar: a smaller Home button and padding beside each menu title
Home in the application bar is a small control, so its square and glyph
take the small control sizes. The menu titles are menu rows with the
control padding on each side of the text, so the hover and open
highlight no longer ends at the edge of the letters.
2026-11-30 20:00:26 -08:00
.CooCoo 703252de65 Merge pull request #10334 from dotCooCoo/fix/script-run-accounting
Scripts: list rebuilds count against the run, a stop is not masked, bad answers throw at the call
2026-11-30 19:18:27 -08:00
.CooCoo e4da493676 Merge pull request #10344 from dotCooCoo/fix/selection-tool-hides-anchors
Selection: a path selected whole shows its anchors without direction handles
2026-11-30 19:12:54 -08:00
dotCooCoo 0ae5a199b2 Tests: linked-profile tests take main's with_profiles temp root
with_profiles on main returns the TempDir root as a third value, so the
three new listing tests did not compile after the merge. They now keep
their outside files under that root, which removes them on drop.
2026-11-30 19:11:32 -08:00
dotCooCoo f4d82931ea Merge main into fix/linked-profile-listing 2026-11-30 18:52:47 -08:00
dotCooCoo 1e4e7cfbfe Selection: a path selected whole shows its anchors without direction handles
With the Selection tool, a selected path drew the direction handles of
every anchor, so it looked as if Direct Selection were active. The canvas
marks now draw the handles only where a tool drags them: a partial
selection's anchors, a selected segment, and a path selected itself under
a tool that edits anchors. Every other selected path, including the
members of a group or compound path selected whole, shows its anchors
selected with no handles. A lone anchor selected whole is drawn with its
handles retracted.
2026-11-30 18:19:35 -08:00
dotCooCoo 1d6af09cff Scripts: a stop from end when show() fails ends the run
When show() failed (an answer that could not be read, a host call that
threw, or a handler that threw), the dialog's failure function called the
host's end and dropped its result, so an Abort from end did not stop the
run and the script could catch the error and finish. The failure function
now returns that stop, and the answer and call paths end the run with it
before the error reaches the script.
2026-11-30 17:59:40 -08:00
dotCooCoo 26cbcb711e Merge main into fix/menu-dialog-kind-names 2026-11-30 17:54:45 -08:00
dotCooCoo 1662723cae MCP: ui.menuDialog lists the slider keys and Edit Points Only
main now lists the Smooth and Simplify sliders in ui.inspect as dialogs
smoothSlider and simplifySlider, which ui.dialog.set, confirm and cancel
control, and Object › Plug-ins › Selection Tools › Edit Points Only…
opens through ui.menuDialog. The params text of ui.menuDialog,
ui.smoothAuto and ui.simplifyAuto, docs/mcp.md and the menu dialog key
test now say so.
2026-11-30 17:54:45 -08:00
.CooCoo 6b9cd3d462 Merge pull request #10328 from dotCooCoo/fix/script-array-host-collections
Scripts: array methods visit every element of a host collection
2026-11-30 17:31:49 -08:00
.CooCoo e3a265870d Merge pull request #10331 from dotCooCoo/fix/script-tests-check-what-they-name
Tests: script DOM and New Document tests check what they name
2026-11-30 17:05:58 -08:00
.CooCoo ccd1ab5cc0 Merge pull request #10330 from dotCooCoo/fix/new-document-card-tile-flake
Main: resting-card test picked Home screen cards in random node order
2026-11-30 16:55:47 -08:00
.CooCoo 251d06b8b3 Merge pull request #10329 from dotCooCoo/fix/script-app-members-checks
Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
2026-11-30 16:42:58 -08:00
.CooCoo 8292a1cc0e Merge pull request #10325 from dotCooCoo/fix/step-repeat-review-findings
Step and Repeat: the dialog stays on its document, and copies go in at once
2026-11-30 16:26:25 -08:00
dotCooCoo 1ce1d2ccf2 New Document: Manage Profiles reports a linked profile as unusable
file.newProfiles and Manage Profiles checked a profile's file with
is_file, which follows a link. A profile file that was a link to a
document was listed as customized with Edit on, while file.new refuses
to read a link and gives the new document the defaults. A link that
led nowhere, or a folder, was listed as not customized, so Reset was
off and could not remove it, and Edit on a link that led nowhere wrote
the shipped profile where the link pointed.

The profile's file is now looked at without following a link:

- file.newProfiles lists a link or a folder as customized, with
  unusable: "not a plain file".
- Manage Profiles dims that profile's name, says why in its tooltip,
  and turns Edit off. Reset stays on for a link and removes the link,
  not the file it leads to. Reset is off for a folder, and
  file.newProfiles.reset gives an error instead of deleting a folder.
- file.newProfiles.edit gives an error for a link or a folder, and
  creates a missing profile file without following a link put there.

Docs: docs/mcp.md (New Document profiles) and the command help.
2026-11-30 16:07:05 -08:00
dotCooCoo aba076239d Scripts: document that a probed host indexer gives the element
The Array.prototype methods that skip missing elements, such as forEach
and map, read each index of a host collection with one indexer call
that has `true` as a third argument and use its answer as the element.
The docs of the module, HostClass::index and host_index now say that
such a call gives the element itself, or undefined when there is none,
and that reads without the third argument, such as those of join, are
ordinary reads.
2026-11-30 15:55:05 -08:00
dotCooCoo fe89d3f81e Scripts: list rebuilds count against the run, a stop is not masked, bad answers throw at the call
- pageItems, pathItems and textFrames build their list of a document again
  after every edit. The rebuild walked the whole document without counting
  anything against the run, so a loop that edits and reads a collection in a
  large document did unbounded host work. A rebuilt list now counts 16 bytes
  per object (as the selection's list does) against the run's host-call
  allowance, and the path and type lists count the page items they scan.
- An edit's own ordinary error was returned ahead of a stop (an uncatchable
  Abort) from putting back the selection or switching back to the active
  document, so a script could catch it and go on. A stop now comes first.
- An answer to a waiting call that could not be read as a value (nested too
  deep, too many entries) ended the run instead of being thrown at the call.
  It is now thrown there, where the script can catch it, and a ScriptUI dialog
  that waited for the answer stops showing, as when its host call fails.
- The selection cost test also compares the host calls, under the same
  64 KiB limit for both documents.
2026-11-30 15:54:45 -08:00
dotCooCoo c0002dbc09 Merge main into fix/menu-dialog-kind-names 2026-11-30 15:53:46 -08:00
dotCooCoo 0a56d7df9d Tests: script DOM and New Document tests check what they name
- The grid-by-column test now checks each artboard's row and column, so
  RLGridByCol must fill from the rightmost column. It compared only the
  number of distinct rows and columns before, which a left-to-right fill
  also passes.
- The keepEmpty test asserts that keepEmpty false deletes the compound
  path, instead of accepting any state other than an empty compound.
- The addDocument profile test closes the profile document before the
  script reads the profile, so the read goes through the app-folder
  exemption and not through the rule for open documents' files.
- The report-origin test adds authored ReferenceError controls for
  Window and activeDocument, and for BridgeTalk thrown as an error
  object, so a hint list that grows to those names cannot change a
  message the script wrote.
- New Document profile tests, and the temporary folders and files in
  script_dom.rs and script_run.rs, use vectorcraft_testkit::TempDir, so
  a failing assertion no longer leaves process-id folders behind. The
  linked-profile test keeps its link target in the same temporary
  folder.
2026-11-30 15:50:56 -08:00
dotCooCoo e4506377ba Main: the resting-card test checks only the New Document dialog's cards
resting_preset_cards_stand_on_a_tile took the first unselected list item
in the frame's access tree. That tree also holds the Home screen's
document cards behind the dialog, which lie flat by design, and the
update lists nodes in hash-map order, which changes from process to
process. When a Home card came first the test failed, so it failed on
some runs of the full workspace and passed alone.

The test now walks the dialog node's subtree and checks every unselected
card in it, so the result no longer depends on node order.
2026-11-30 15:49:02 -08:00
dotCooCoo b8ee4686b0 Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
app.getIsFileOpen treated any path with a backslash as a Windows path,
turning each backslash into a folder separator and ignoring letter case.
On macOS and Linux a backslash is a character of a file name, so
getIsFileOpen answered true for the path /work/a\b.ai while /work/a/b.ai
was open.
Paths now get the Windows rules only on Windows or when they start with a
drive letter.

DocumentPreset.typename and toString() answered for a preset kept from
an earlier run with #targetengine, while its settings throw a TypeError.
Both now check the preset the way the settings do.

Documents.addDocumentNoUI(startupPreset) was missing. It now makes the
document addDocument(startupPreset) makes.
2026-11-30 15:39:56 -08:00
.CooCoo b8470d947f Merge pull request #5272 from ljkx/fine-nudge-5258
Nudge: Ctrl/Cmd+arrow moves by a tenth of the keyboard increment (#5258)
2026-11-30 15:27:20 -08:00
dotCooCoo a353ebef69 Scripts: array methods visit every element of a host collection
Array.prototype methods called on a host collection with more than 4,096
elements, such as forEach over a document's page items, visited only the
indices held as properties. A host collection keeps its elements in the
host, so those methods skipped every element. They now visit every
index of an object whose class has an indexer.

Each element read also called the indexer twice, once to test presence
and once to read the value. The methods now read an index of such an
object with one call, the one `k in object` makes, and take its answer as
the element.
2026-11-30 15:22:04 -08:00
.CooCoo 90e08df23f Merge pull request #10312 from dotCooCoo/fix/ui-frame-stability
Menus: a menu opens under its title on a monitor beside a portrait one
2026-11-30 15:02:38 -08:00
dotCooCoo f498c562e2 Merge main into fix/step-repeat-review-findings 2026-11-30 14:51:53 -08:00
dotCooCoo 8bd0b57c57 Step and Repeat: the dialog stays on its document, and copies go in at once
The Step and Repeat dialog now acts only on the document it was opened
on. Its preview no longer runs on another document, and OK is refused
there, or after File > Revert, with the reason shown. Opening the dialog
again rolls back the earlier dialog's preview instead of leaving its
copies on the canvas.

object.stepAndRepeat makes every copy first and inserts them in one
pass, so a large grid walks the document a fixed number of times
instead of once per copy. The stacking order of the copies is
unchanged. A negative margin, and a gap of minus the width or height
or less, are refused instead of being clamped or folding the grid back
on itself.
2026-11-30 14:51:52 -08:00
.CooCoo 639ce5004e Merge pull request #10304 from dotCooCoo/fix/smooth-bridge-says-why
Smooth Bridge: a refusal says why an object is not a circle
2026-11-30 14:39:43 -08:00
.CooCoo cb0a23d293 Merge pull request #9052 from dotCooCoo/feat/scripts-api-d6-save-export-open
Scripts: documents save, export and open through Document.saveAs, exportFile and app.open
2026-11-30 14:36:03 -08:00
.CooCoo 38846fcdf3 Merge pull request #10116 from dotCooCoo/feat/edit-points-only
Selection Tools: Edit Points Only narrows a Direct Selection to its anchor points
2026-11-30 14:19:49 -08:00
.CooCoo 27a91089bf Merge pull request #10092 from dotCooCoo/fix/simplify-smooth-dialog-host
MCP: the Simplify and Smooth sliders show in ui.inspect and answer ui.dialog
2026-11-30 14:19:32 -08:00
.CooCoo 0b55e3160a Merge pull request #10085 from dotCooCoo/fix/color-value-finite
Colors: a color with a component too large to store is refused
2026-11-30 14:19:14 -08:00