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.
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.
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.
- app.documents.add: artboardRowsOrCols sets the rows of GridByCol and
RLGridByCol and the columns of GridByRow and RLGridByRow; Row, RLRow
and Column do not use it.
- PageItem.duplicate runs node.move on the copy only with a relative
object, and move and duplicate skip node.move when the object is
already in place.
- edit.clear takes null for guides, keepEmpty and keepJoined as the key
left out, as switch_or reads them.
- The scripts entry in docs/target-app-parity.md no longer lists type
as missing; document.textFrames ships.
docs/mcp.md said every group counts as the objects inside it toward the 2,000-object limit. The command expands only groups other than clipping groups (bridge.rs, the clip: false arm), so a clipping group counts as one object, which is not a circle.
When outlines replace circles that sit in different groups, the circles
that go left their groups behind with nothing in them. Each group or
compound path left empty now goes in the same undo step, and so does
each group above it left empty in turn; layers and sublayers stay.
A transform that stretches an ellipse keeps its stored width and height,
so a circle stretched into an oval still stores equal ones. The refusal
now names unequal width and height only when the stored values differ,
and gives the general message otherwise. docs/mcp.md notes that more
than 2,000 objects are refused by the circle limit before any object is
checked.
The Path operations row no longer lists Live Paint Gap Options, which
ship with Gap Detection, custom sizes, Close Gaps With Paths and
Preview. The Strokes row names the stylus wheel on native Wayland as
the one place it is not read. The Type core row lists Optical Margin
Alignment as done for point, area and path type, right-to-left
paragraphs included. The Symbols row says embedded-document saves
reopen with editable 9-slice guides only when that document is current
and readable.
Smooth Bridge only joins circles. Anything else in the selection gave
"select two or more circles to bridge", the same message as for one
circle. An ellipse drawn by dragging without Shift is a few tenths of a
point off a circle and was refused with that message, which did not say
which object was at fault or why.
The refusal now names the first object that is not a circle and why:
an ellipse whose width and height differ (draw it with Shift held, or
give it equal width and height), a compound path (release it first),
an object that is hidden or locked, or another object. The message
shows on the status line while the dialog previews and after OK.
Smooth Bridge refused a selected group with "select two or more circles
to bridge", even when every object in the group was a circle, so
grouping circles first and selecting the group did nothing. The command
now takes the objects inside each selected group (at any depth; a
clipping group stays one object), so a group of circles is bridged in
place, inside the group. A group that holds anything other than a circle
is still refused, as before.
The dialog's Reach field counts a selected group's objects too, so it is
available when a selected group holds three or more circles; a circle
selected together with its group counts once.
The parity doc, docs/dimensions.md and two comments said the box shown
while hovering a path with Alt held goes through the path's outermost
points. It follows the box the strokes paint, which reaches 0.5 pt past
those points for a centered 1 pt stroke.
The enumerations whose default member an option keeps (OutputFlattening,
CompressionQuality, the PDF color, compression, mark and security enums,
and the SVG encoding, DTD, CSS and font enums) are now defined, so a
script that sets an option to its default no longer throws a
ReferenceError; another member still throws as not available yet.
saveAs, exportFile, app.open and close with SAVECHANGES refuse a path
whose real file name is not valid UTF-8 instead of writing to or opening
a file named with a lossy copy of it.