Highlight Substituted Fonts is now a preference in Preferences › Type,
next to Highlight Alternate Glyphs, on by default and saved with the
other preferences (`prefs.set highlightSubstitutedFonts`). The canvas
reads it through `RenderOptions::highlight_substituted_fonts` for every
open document; a document's own setup no longer decides it. File ›
Document Setup no longer shows the checkbox and keeps Highlight
Substituted Glyphs.
A file saved with Document Setup's Highlight Substituted Fonts off now
shows the pink highlight when it opens, while the preference is on.
The file still opens with the stored value, and saving it again keeps
that value.
`document.setup` no longer reports `highlightSubstitutedFonts`. It
ignores the key and adds a `warnings` entry that names `prefs.set` to
its reply, so an older reply passed back still applies its other keys.
The raster cache of type under a raster effect now also redraws when
Highlight Alternate Glyphs changes.
Pointer Events report a press of a pen's eraser end as the eraser button
(button 5). The browser build ignored that press. It now presses like the
tip, and the web runner writes the pen's samples into a stylus feed with
the end they came from, so the canvas selects the Eraser tool before the
press and the press erases. The next press of the tip selects the tool
used before, as on Linux and macOS. A hovering pen keeps the end it last
pressed with, since Pointer Events report no end while a pen hovers. A
mouse or finger takes the pen out of the feed; a palm rejected while the
pen presses does not.
Docs: docs/hardware-parity.md, docs/gaps.md (G14),
docs/target-app-parity.md.
With Windows Ink, winit reports a pen as a touch and drops its pen
flags, so on Windows the eraser end of a pen draws with the current
tool. The message hook that reads the barrel button now also reads
each pen pointer message's POINTER_PEN_INFO and writes the pen's
pressure and end into the canvas's pen feed: PEN_FLAG_INVERTED or
PEN_FLAG_ERASER is the eraser end. The canvas then selects the Eraser
tool and the tip brings back the tool used before, as on Linux and
macOS. A pen leaving detection range or the window, another pointer,
or a mouse message that Windows did not make from a pen or a touch
clears the feed, so a mouse presses fully.
On a curved path each glyph was placed rigidly (turned to the tangent at
its middle), so its baseline ends stood off the curve and neighbours
turned by different angles: in scripts whose letters join, every join
opened into a notch. Measured with Arial on circles: at 29 pt on a
radius of 110 pt, 0.64 pt at the baseline and 1.24 pt at the height of
the joining stroke (a quarter of the size); 14.7 pt at 72 pt on a radius
of 60. Placing glyphs on the chord alone closes the baseline but leaves
about h (a_i + a_{i+1}) / 2R above it (0.71 pt here), so joined glyphs
are bent instead.
- Shaping marks each glyph of a segment whose script joins (Arabic,
Syriac, N'Ko, Mongolian, Adlam and the other cursive scripts), by the
segment's script, so a word bends as a whole.
- With the Rainbow effect such a glyph's outline is mapped point by
point: pen space (x, y) -> P(s + x step/advance) + (y + rise) N there,
each segment cut into pieces short enough for 0.01 pt (capped). A
glyph the path doesn't turn under stays exactly as it was; Skew, 3D
Ribbon, Stair Step and Gravity, vertical type, inline art and colour
glyphs are unchanged. `PositionedGlyph::bend` records it; `xf` stays
the straight glyph for the caret, hit testing and tools.
- PDF export draws bent glyphs as outlines and writes them again as
invisible text where they stand, so they can be selected, searched
and copied. SVG export outlines them (right-to-left type already was),
never as a <textPath>, and labels the group with its text
(role="img", aria-label) for screen readers and search.
Tests (crates/text/src/tests_path_joins.rs; installed Arabic font, skip
without one): the gap at the baseline and at join height is <= 0.01 pt
at 12, 29 and 72 pt on radii 60, 110 and 300, on both sides of the
path, with finite outlines; Latin on a curve and joined type on a
straight path are byte-for-byte what they were; the chord-only
prediction is checked.
vectorcraft-cli perf (load average 43 before, 34 after: not trustworthy;
the synthetic document has no type on a path, so bending doesn't run):
render fit 113.8 -> 132.7 ms, pan 115.5 -> 140.0 ms, 400% 32.9 -> 43.3
ms, hit test 1.36 -> 1.59 ms, save 81.5 -> 88.2 ms, open 306 -> 401 ms,
SVG 426 -> 439 ms, Pathfinder 93.7 -> 85.5 ms, handle drag 5.5 -> 6.7
ms, segment drag 5.1 -> 6.7 ms.
Draw freeform paths with the Pencil tool says a small star appears on
the Pencil when it is ready to draw a freeform path, and Reshape paths
with the Pencil tool says the star disappears over a selected path the
drag reshapes. The Pencil cursor had no star.
- New Cursor::PencilNew: the Pencil's crosshair with a small star where
the closing cursor has its ring. It becomes the crosshair with Use
Precise Cursors and as a system cursor.
- The Pencil shows it before a press when neither find_extend nor
find_redraw (the lookups the press uses, within Edit Selected Paths)
finds a selected path under the pointer. Over such a path and while a
stroke is drawn, the cursor has no star.
Docs: docs/target-app-parity.md.
Art Brush Options' Width had no pen tablet option, so an art brush
drew at one width whatever the pressure. The Width row now has a
Fixed or Pressure menu and a second width. With Pressure the art is
Width wide at the lightest pen pressure and the second width at the
heaviest, following the pressure the Paintbrush recorded along the
stroke, and half way between the two on a stroke drawn without
pressure. brush.options takes width_mode and width_max; a brush
without them is saved as before.
Pencil Tool Options has a Live curve fitting checkbox, on by default.
With it off, the path shown while a Pencil stroke is drawn joins the
stroke's points with straight segments, and the release fits the curve
at the Fidelity, as it does with the option on. Choosing another tool
while a stroke is drawn also keeps the stroke fitted. The option is
saved with the tool's other options.
path.freehand takes fit (true by default): with fit false, a new path,
a continued path and a redrawn section join the points with straight
segments.
The reference app detects lists typed as 1., 1), A. or A), and makes
custom bullets from *, #, > or + followed by a space. In VectorCraft
the characters stayed as text.
When the Type tool types a space on its own after one of these at the
start of a paragraph in no list, the typing so far becomes one undo
step. The new command text.startList then removes the typed characters
and the space and makes the paragraph a numbered list in 1, 2, 3 or
A, B, C, or a bulleted list with the filled dot. A paragraph with no
indents gets the 18 pt hanging indent. One Undo puts the characters
back as text with no list, and the caret goes on after them; Redo
removes them again. The same characters later in a paragraph, list
characters pasted in one piece with the space and a paragraph already
in a list start nothing.
Docs: docs/mcp.md, docs/target-app-parity.md.
The test checked only that each outline had a dark pixel, which a line
two or more pixels wide also has. It now counts the dark pixels across
the path, a stem of the type and the guide, and expects one, with and
without supersampling.
After imageTrace.setView, screenshot and render_preview still drew the
tracing result, because ui.render renders with the export options and only
the canvas turns on trace views. Only the app window showed the view.
ui.render now takes traceViews. With traceViews: true, Image Trace objects
draw in the view set with imageTrace.setView, as on the canvas, both
headless and in the running app. screenshot and render_preview take
traceViews and pass it on; without it they draw the tracing result, as
exports do. The trace-and-style prompt names the argument.
A supersampled render drew Outline view's lines, type outlines and dotted
guides as little as a quarter of an output pixel wide, so they came out
pale gray. The renderer now scales those widths and the guides' dashes by
the supersampling factor in the larger frame, so the lines stay one output
pixel wide.
Docs: docs/mcp.md (render_preview, screenshot), docs/control-protocol.md
(ui.render).
Move opened without Distance and Angle, so its first frame replaced the
values a control client set with ones computed from Horizontal and
Vertical, and OK read Horizontal and Vertical without the Distance and
Angle set since the last frame. Move now opens holding the Distance and
Angle of its offset, and OK applies a Distance and Angle set since the
last frame.
ui.dialog.set stored any field name it was given, so a misspelled field
(`discrad` for `discard`) was kept without effect and the dialog then
ran with its old value. It now answers such a field with an error that
lists the dialog's fields, and leaves the dialog unchanged.
A dialog accepts the fields it holds, `__` fields, `discard` with a
discard button, `preview` with a live preview, the fields it reads
before a control adds them (each spec's `inputs`, for example Copy and
the object options of the Transform dialogs, Move's `distance` and
`angle`, the reference point, `path` of the export options dialogs,
`searchFolder`, Brush Options' `tips`, the Justification and
Hyphenation values that open blank, the Corners `kind` and `radius` of
corners that differ, the Gradient Stop popover's `color`, `opacity`,
`location` and `spread`, and a new artboard's `color` and display
marks), and the fields it passes to the command it runs: every
parameter of the generic `command` dialog's command, and the
`textureImage` that Load Texture… sets in the Glass and Texturizer
effects. Edit Selection now opens holding `deleted<i>` for each of its
rows, so setting a row number it does not have returns an error, and
Transparency Flattener Presets opens holding the selected preset's name
and options instead of adding them on its first frame.
A command.batch that edited a document with an undo group and then a
document without one was dropped from the journal as a whole when the
group was canceled, so a replay lost the second document's edit, which
the session kept. Each batch step is now noted in the undo groups it
belongs to, by the same rule as a top-level command, and a cancel takes
only those steps out of the batch's journal entry. A step that changed
the active document becomes that change. Undo groups that stay open
follow the entry and step numbers that a cancel changes.
With Preview off, selecting a plain image after an Image Trace object
kept the panel on that object without saving its waiting settings. A
trace of the image then made the image's trace the panel's object, and
selecting the first object again showed its stored settings and lost the
change. The panel now keeps the waiting settings for the object it
leaves whatever is selected next.
With Preview off, changes made in the Image Trace panel for one Image
Trace object were lost when another object was selected: selecting the
first object again showed its stored settings. The panel now keeps the
waiting changes for each object and shows them again when that object
is selected, unless the object's own settings changed in the meantime.
When Preview was turned on while another object was selected, the
object is traced with its changes when it is selected again.
Preview is now the UI command imageTrace.preview ({on?}: on, off or
toggle), and both the panel's checkbox and ui.set's imageTracePreview
run it. The command label has a row in every catalog.
The test of a color whose every path straightens to no area traced a
pale blue row with a library of a light color, black and [40, 120, 240].
With Document Library weighing hue and chroma three times as much as
lightness, the row takes the light color instead of that blue, so the
test no longer traced any blue. The library blue is now [60, 130, 235],
which the row still maps to; the assertions are unchanged.
With the Document Library palette, each pixel took the library color
nearest in plain Oklab distance. A 50% gray lies nearer in that distance
to a saturated blue of the same lightness than to black or a light
cream, and a muted brown is also nearer to the blue than to either. With
a black, cream and blue library, both traced as the blue.
This changes how Document Library matches pixels: each pixel now takes
the library color nearest with differences in hue and chroma (Oklab a
and b) counted three times as much as lightness. The same measure picks
which library colors are used. Neutral and muted tones take a neutral
library color, and the other palettes are unchanged.
With Method Overlapping, each color layer covered every pixel of the colors
above it in the stack. A small dot or square on a background was then traced
once in its own color and again, at the same bounds, in every color between
the background and it, and with Shapes on each copy became its own live shape.
Those layers also ended on edges they never touched and showed through the
anti-aliased rim there.
Each layer now leaves out every 4-connected part of its stacked area that holds
no pixel of its own color. This changes the result of many Overlapping traces,
the photo presets included: fewer paths (High Fidelity Photo 121 to 69.6 on its
own quality inputs, Low Fidelity Photo 37.1 to 26.1) and no rim, around a
shape, of a color that sits apart from it. One existing test that counted the
extra copies now expects one layer per area, and another that compared layer
pixel counts now checks that the bottom layer covers the whole image.
Two shapes that overlap by less than the region precision (0.01 pt) leave
their overlap out of the Shape Builder's regions as a sliver. Merging the
regions on both sides of it united only the picked faces, so the result
was a compound path with a hairline gap where the overlap had been.
A merge now takes in each dropped sliver next to a merged face when only
the merged faces' shapes fill it, both from the arrangement and from the
planar map used when open paths are selected. A thin cutout that no shape
fills stays a hole. What is left of a shape after the merge takes in a
sliver only where the shape covers it and the merged shape does not take
it in, so the two do not overlap. Pathfinder operations and Live Paint do
not use the merger and are unchanged; Live Paint's planar map does not
test which shapes cover a sliver.
When both sides of a 1.5 pt bar have a point level with a click 0.1 pt
from its end, the point of each side nearest the click is the end of a
segment, so the sides were not tried and an Alt-click there touched the
end edge.
A segment end now also counts when the segment is square there to the
line to the point, so splitting a side at the click gives the same
answer as an unsplit side.
A point 0.1 pt from the end of a 1.5 pt bar is nearest the end of the
bar, and the line from there through the point runs along the bar, so
the region did not count as narrow and an Alt-click there touched the
end edge.
A region now counts as narrow at a point when it is no more than twice
the tolerance across from any outline segment within the tolerance whose
point square to the line to the point lies inside the segment, as well
as from the nearest point of the outline. Segment ends other than the
nearest point are not tried, so a point added on an edge does not change
the result near a corner.
In erase mode the tool tests each point for a line piece or an edge
within the tolerance before the region under it. Every point of a region
narrower than twice the tolerance is that close to its edges, so an
Alt-click, the Alt hover and an Alt-drag over a thin overlap touched its
edges and not the overlap, and the overlap was left behind.
A point in a region now touches the region when the region is no more
than twice the tolerance across there, measured from the nearest point
of its outline through the point to the outline on the other side. This
covers a drag at any angle, a drag that starts or ends in the region,
and a thin shape inside another or on its own. Near an edge of a wider
region, the edge is touched as before.
shapeBuilder.merge built the planar map of the selection again, on the
thread that runs the command, although the Shape Builder tool had just
built the same map for its hover. The tool now returns its map from a
new Tool::shape_builder_map, and the command uses that map when its
inputs are the merge's inputs and its gap is the merge's gap; otherwise
it builds its own as before. The tool's map has the outline edges, so
erasing and splitting a stroke use it too.
CodeRabbit on #4080: `needed` summed footprint pieces before insertion
deduplicated them, so on a degenerate grid (ten collinear lines, 4,096 pieces
each in ten cells) every item exceeded the budget and went to the scanned list,
making the per-cell assertion vacuous. The cells are now collected in piece
order and consecutive repeats dropped before the budget check and the filing;
the horizontal fixture asserts `rest` is empty and that the lines are filed.
docs/target-app-parity.md: the Path operations area row, the Shape Builder
row and the evidence list record the bounded index (scores unchanged).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gCpjL3yUhaH3jRp7ksufh
Follow-up to #4021. The grid filed each piece of a segment under its cells
without checking, so a degenerate grid (collinear horizontal lines: cells a
hundred points wide and a hair tall) stored one segment ~400 times per cell,
and coincident vertical segments (one column, a row per segment) filed every
segment under every row: a quadratic number of references, about a GiB for
16,384 segments within the Shape Builder's limit.
Now a segment is filed once per cell (its pieces come in order, so the cell's
last entry is enough to check), and the grid holds a budget of references
(64 per item plus four rows' or columns' worth, `reference_budget`); the
items past it go to the scanned list, so the index stays O(n·sqrt(n)) in
memory and every lookup still finds every segment through its point.
Regression: `rect_index_holds_a_bounded_number_of_references` (fails without
the change: 4,100 references per cell for ten collinear lines).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gCpjL3yUhaH3jRp7ksufh
A group counted as a Live Paint group when its name started with "Live
Paint". A plain group named, for example, "Live Painting" was then read
as one. With it and another shape selected, the Shape Builder found no
regions in it, and a merge on the other shape deleted the group and its
paths. Make Live Paint took the group as a Live Paint group to merge
into, and its paths did not become sources.
A Live Paint group now also needs its sources group, the group named
"Live Paint Sources" that Make Live Paint puts in it. A plain group with
such a name is traversed like any other group.
draw_path, draw_shape and object.setProps take opacity in percent (0-100),
but the document.inspect / document.node summary behind doc_inspect,
inspect_document and vectorcraft://object/{id} reported the stored 0-1
fraction under the same name. An agent that read 0.55 and wrote it back
got a nearly invisible object.
The summary now adds opacityPct (0-100, rounded to 1/100 of a percent)
beside the unchanged opacity, and the tool, resource and command
descriptions say which scale each field uses. Round-trip test in the mcp
crate: draw at 55 %, read 55 back from doc_inspect, inspect_document and
the object resource, write it back unchanged.
## Summary
`vectorcraft-cli convert` to PDF now passes `preserveEditing: false`, matching
a command-line converter expectation while Save As PDF in the app still uses
the VectorCraft Default preset. `--preserve-editing` opts in and adds a JSON
warning when the native document attachment is written.
## Tests
Integration test in `vectorcraft-cli` checks default PDF output has no editing
attachment and `--preserve-editing` embeds it with a warning.
Closesstorytold/vectorcraft#3627
Co-authored-by: nrq6993-a11y <nrq6993-a11y@users.noreply.github.com>
## Summary
`vectorcraft-cli convert` to PDF now passes `preserveEditing: false`, matching
a command-line converter expectation while Save As PDF in the app still uses
the VectorCraft Default preset. `--preserve-editing` opts in and adds a JSON
warning when the native document attachment is written.
## Tests
Integration test in `vectorcraft-cli` checks default PDF output has no editing
attachment and `--preserve-editing` embeds it with a warning.
Closesstorytold/vectorcraft#3627
Co-authored-by: nrq6993-a11y <nrq6993-a11y@users.noreply.github.com>