Merge main into fix/retype-drawn-shape-font-state

This commit is contained in:
dotCooCoo
2026-11-20 20:29:06 -08:00
149 changed files with 10437 additions and 11526 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ nothing below L6 depends on a UI toolkit (egui, eframe, winit, rfd). Table: `xta
| Layer | Crates | Role |
|---|---|---|
| L0 | `geom`, `color`; `affinity`, `cdr` (standalone, no workspace deps) | curves and transforms (on `kurbo`), colour models, ICC and conversions; the Affinity and `.cdr`/`.cmx` readers |
| L0 | `geom`, `color`; `affinity` (standalone, no workspace deps) | curves and transforms (on `kurbo`), colour models, ICC and conversions; the Affinity reader (CDR/CMX moved to `craft-cdr`) |
| L1 | `doc` | the document model: artboards, layers, objects, appearance, text, symbols; pure data + serde, structural sharing |
| L2 | `pathops`, `brush`, `trace`, `text`, `effects`, `plugins`, `three-d` | booleans/Shape Builder/offset/outline; brushes; Image Trace; fonts, shaping (HarfRust, skrifa), bidi and layout; live effects and the pixel-filter pipeline; sandboxed WebAssembly plug-ins (wasmi); 3D surfaces of revolution, projection and shading (`three-d`, on `geom` only) |
| L3 | `render`, `svg`, `pdf`, `format`, `eps`, `cad`, `metafile` | document to pixels (`vello_cpu`, multithreaded); SVG, PDF, native JSON, EPS/PostScript (with its own interpreter), DXF, EMF/WMF readers and writers |
+5 -1
View File
@@ -330,7 +330,11 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE
## Cursors
`crates/tools/src/cursors.toml` lists every `Cursor` value: when it shows, in plain behaviour terms, and where its hotspot is, so whoever draws the cursors knows what each one is for without reading the tools (CLAUDE.md › Adding a cursor). `cargo xtask cursors` (part of `cargo xtask ci`) warns about a `Cursor` value with no entry, an entry with no `Cursor` value, a repeated id or a missing field; it never fails the build. A cursor not drawn yet borrows another's look (`Cursor::stand_in`).
`crates/tools/src/cursors.toml` lists every `Cursor` value: when it shows, in plain behaviour terms, and where its hotspot is, so whoever draws the cursors knows what each one is for without reading the tools (see Adding a cursor below). `cargo xtask cursors` (part of `cargo xtask ci`) warns about a `Cursor` value with no entry, an entry with no `Cursor` value, a repeated id or a missing field; it never fails the build. A cursor not drawn yet borrows another's look (`Cursor::stand_in`).
### Adding a cursor
The app decides which cursors exist; whoever draws them works from the list. For a new tool state with a cursor of its own: add the `Cursor` variant (`crates/tools/src/lib.rs`, with a doc comment), return it from the tool's `cursor()` with a tool test, cover it in `cursor_icon` (`crates/ui-egui/src/canvas.rs`), draw it in `crates/ui-egui/src/cursors.rs` or give it a stand-in in `Cursor::stand_in()` until it is drawn, and add its `[[cursor]]` entry to `crates/tools/src/cursors.toml` (when it shows, in plain behaviour terms, and its hotspot). A missing entry only warns (`cargo xtask cursors`): the cursor still works.
## Vendor names gate
+5 -1
View File
@@ -31,7 +31,11 @@ The **Dimension Tool** is in the Modify section of the toolbar. Its strip offers
anchor, guide, grid or pixel snapping places lands on the closest point of a segment, or of a
line of a dimension already drawn, within 8 pixels. With Smart Guides and Anchor/Path Labels
on, a point on an anchor or a line end shows the "anchor" label, and a point on a segment or
line shows the "path" label. These rules apply to the Linear points.
line shows the "path" label. These rules apply to the Linear points. A first point picked on
an anchor, on a segment or on a corner of preview bounds moves with that art when the art moves
before the second click: the rubber band, Shift and the dimension start from where the art puts
the point then. When that art is deleted before the second click, the point goes back to where
it was picked.
With Use Preview Bounds on (Preferences › General), a Linear point can land on a corner of the
preview bounds of a path or compound path whose strokes or effects reach past its anchors. The
[linear dimensions help](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html)
+2 -2
View File
@@ -335,8 +335,8 @@ Gradient meshes in the editing data keep each point's own color where a patch's
| PICT | open, place (legacy) | yes (versions 1 and 2: shapes, lines, regions, text, bitmaps, pixel maps and QuickTime JPEG images; placed as one group clipped to the picture's frame) | no | `.pct`, `.pic` and `.pict`; a version 2 picture also opens by its content; a two-color pattern fills with its average color; inverted shapes, transfer modes other than a copy and QuickTime images in other formats come back as warnings; a picture cut short keeps what came before it; tests in `crates/metafile/src/tests/pict.rs`, `crates/engine/src/cmd/fileio/tests_pict.rs` and `crates/engine/tests/import_fuzz.rs` |
| Pixar PXR | open, place (legacy) | yes (any set of the R, G, B and A channels in 8 or 12 bits, dumped or run-length encoded, in tiles; R alone is gray; alpha matted to black or unassociated) | no | recognized by its magic number; 12-bit samples are clamped to 0.0 to 1.0; null tiles are transparent with A and black without; the offsets aren't read, and the image takes the default resolution; a file cut short, with header values or packets the format doesn't define, or past the pixel allowance is refused with a message; tested on synthetic files only; tests in `crates/engine/src/cmd/fileio/tests_pxrread.rs` and `crates/engine/tests/import_fuzz.rs` |
| FreeHand `.fh*` | open (legacy) | no | no | |
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, clipping containers, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; hidden and locked layers, groups and objects; the winding flag as the nonzero fill rule; uniform transparency of version 13 on as opacity and blend mode; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses, other transparency and merge modes without a blend mode are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; after an open with a warning, an export or Save As to the drawing's own path needs `acknowledgeLoss: true`; record layouts and their sources in `crates/cdr/PROVENANCE.md`; synthetic test files only; tests in `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
| `.cmx` exchange files | | yes (files with 32-bit coordinates: pages, layers, groups, curves, uniform fills and outlines with their width, color, caps, joins and dashes; text, images, rectangles, ellipses, clipping paths, other fills and arrowheads are left out with a warning, and lenses are not applied, with a warning; big-endian files and files with 16-bit coordinates are refused) | no | File › Place reads them too; after an open with a warning, an export or Save As to the file's own path needs `acknowledgeLoss: true`; layouts and their sources in `crates/cdr/PROVENANCE.md` (R53 to R63); synthetic test files only; tests in `crates/cdr/tests/it/cmx.rs`, `crates/engine/src/cmd/fileio/tests_cmx.rs` and `crates/engine/tests/import_fuzz.rs` |
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, clipping containers, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; hidden and locked layers, groups and objects; the winding flag as the nonzero fill rule; uniform transparency of version 13 on as opacity and blend mode; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses, other transparency and merge modes without a blend mode are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; after an open with a warning, an export or Save As to the drawing's own path needs `acknowledgeLoss: true`; record layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
| `.cmx` exchange files | | yes (files with 32-bit coordinates: pages, layers, groups, curves, uniform fills and outlines with their width, color, caps, joins and dashes; text, images, rectangles, ellipses, clipping paths, other fills and arrowheads are left out with a warning, and lenses are not applied, with a warning; big-endian files and files with 16-bit coordinates are refused) | no | File › Place reads them too; after an open with a warning, an export or Save As to the file's own path needs `acknowledgeLoss: true`; layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`, R53 to R63); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/cmx.rs`, `crates/engine/src/cmd/fileio/tests_cmx.rs` and `crates/engine/tests/import_fuzz.rs` |
| Text `.txt` | place, export | place (Text Import Options) | yes | place reads Unicode and ANSI, and Shift JIS, GB2312, Chinese Big 5, Cyrillic, GB18030, Greek, Turkish, Baltic and Central European through the WHATWG Encoding Standard's decoders (VectorCraft's own mapping); `tests/textimport.rs`, `place/text.rs`; fuzzed (`text_import_fuzz.rs`) |
| RTF `.rtf` | place | place (area type with fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/rtf.rs`; fuzzed (`text_import_fuzz.rs`); `\'hh` bytes read as Windows-1252 or Mac Roman only |
| Word `.docx` | place | place (area type with the document's styles and its fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/docx.rs`; fuzzed (`text_import_fuzz.rs`); list numbers, pictures and text boxes are left out |
+24 -3
View File
File diff suppressed because one or more lines are too long
+81 -20
View File
@@ -2556,10 +2556,10 @@ control character, in the first 8 KiB) or `tooLarge` (over 8 MiB). For a script,
- `menuCommands.strings` lists the string literals the script passes to `executeMenuCommand`
(`app.executeMenuCommand('…')`), each with a count and its lines, and `menuCommands.dynamic` counts the calls
whose argument isn't a string literal.
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used),
`filesOpened` (files opened in other apps), `network`, `nativeCode`, `otherApps` (messages to other apps),
`environment` (environment variables), `unseenCode` (`eval`, `new Function` and `$.evalFile`) and
`preferences` (the reference app's preferences changed).
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used; setting a
File object's `length`, `hidden` or `readonly` counts too), `filesOpened` (files opened in other apps), `network`,
`nativeCode`, `otherApps` (messages to other apps), `environment` (environment variables), `unseenCode` (`eval`,
`new Function` and `$.evalFile`) and `preferences` (the reference app's preferences changed).
- `problems` lists what would stop the script loading as written (strings, comments, regular expressions,
template literals and XML literals that aren't closed, brackets that don't match, syntax newer than ES3 and
unknown directives) and notes on its text (bytes that aren't valid UTF-8, mixed line endings, and nesting deeper
@@ -3885,7 +3885,10 @@ already walks Image Trace. Short agent entry points:
art, where it is, snaps the art again after it is edited, and does not count
instances in `select.object.notAlignedToPixelGrid`; `alignToPixelGrid` alone with the value the symbol already has
adds no undo step),
`symbol.place {name?, x?, y?}`, `symbol.placeFromDocument {sourceDocument, name, x?, y?}` (an instance of a symbol
`symbol.place {name?, x?, y?}` (on top of the current layer; in Draw Behind directly below the bottommost selected
object, beside the compound path that holds it, or at the bottom of the current layer with nothing selected, above
a clipping path; `symbol.placeFromDocument` and `symbol.addFromLibrary` with `place` stack the instance the same
way), `symbol.placeFromDocument {sourceDocument, name, x?, y?}` (an instance of a symbol
of another open document, as a symbol dragged from that document's Symbols panel onto the canvas places it: the
symbol, the symbols it nests and the resources they use are added as `edit.dropSelection` adds them, in the same
undo step, and a symbol with the same name but other art or Symbol Options is added under a free name; an error
@@ -5147,7 +5150,7 @@ art", and a loaded file draws the source path, as it does for a solid past its l
documentation names the controls and their ranges
([3D and Materials panel options](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/3d-materials-panel-options.html)).
The settings are saved in the native file; SVG and PDF exports draw the shadow, and `effect.expandAppearance` keeps
it as a path. Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) have no shadow. See [three-d.md](three-d.md#shadows).
a hard shadow as a path and turns a blurred one into an image. Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) have no shadow. See [three-d.md](three-d.md#shadows).
```json
{"name":"run_command","arguments":{"command":"effect.setParams","params":{"index":0,"item":null,"params":{"shadow":true,"shadowPosition":"below","shadowDistance":10,"shadowBounds":150}}}}
@@ -5702,11 +5705,15 @@ fills and strokes above it paint over the members (characters), those below unde
`appearance.contents_index`. The `appearance.*`, `effect.*` and `graphicStyle.apply` commands edit the selected
objects themselves (a group's own stack; layers through `ids`) or, with `target: "contents"`, the objects inside the
groups and layers. In a Live Paint group those are its faces and edges, not its hidden source paths.
`appearance.addFill` adds a fill to the faces only, and `appearance.addStroke` adds a stroke to the edges only; a selected group left with only its hidden source paths is returned without a change. A
`appearance.addFill` adds a fill to the faces only, and `appearance.addStroke` adds a stroke to the edges only. On a
selected group left with only its hidden source paths, either command changes nothing. A
fill or stroke command with an `item` and `target: "contents"` (such as `paint.setFill`, `stroke.set`,
`paint.invert`, `paint.setGradientGeom` and `object.setOverprint`) changes the faces for a fill row and the edges for
a stroke row. The row commands (`appearance.setItem`, `appearance.removeItem` and the others) find their rows on each
face and edge as on any other object in the contents.
face and edge as on any other object in the contents. `graphicStyle.apply` gives each face only the style's fills and
each edge only its strokes, with or without `add`, and links neither to the style. `appearance.clear` leaves a face
one empty fill and an edge one empty stroke, and `appearance.reduceToBasic` keeps only a face's fill and only an
edge's stroke.
`appearance.targetContents` selects a group's members (double-clicking the Contents row).
SVG and PDF export bake a group's own fills, strokes and geometry effects into paths; its raster effects stay a
filter on the whole group in SVG and become an image of the whole group in PDF.
@@ -6218,7 +6225,8 @@ Each Effect › Pathfinder effect (`pathfinder.add` … `pathfinder.softMix`, no
in its params: `precision` (a number, 0.001–10 pt), `removeRedundantPoints` and `removeUnpainted` (true or false), which
mean what they mean for the panel's operations; the other operations ignore `removeUnpainted`. With `removeUnpainted`
on, a compound shape's area counts as filled when the shape has a visible fill of its own, and Divide keeps every piece
when the group or compound shape has one. Outline strokes a compound shape's area in the shape's own fill. `effect.apply`
when the group or compound shape has one. Outline strokes a compound shape's area in the shape's own fill, and gives
the edges no paint when the shape has no fill (the shape's own strokes still draw over the result). `effect.apply`
fills the ones `params` leave out from the current Pathfinder Options, and the values join its journal entry. An effect
saved without them evaluates with precision 0.01 and both switches off, as before effects kept them. `effect.setParams
{index, params: {precision?, removeRedundantPoints?, removeUnpainted?}}` edits them as one undo step; values the
@@ -7554,7 +7562,7 @@ and the weed box of Weed Box and Lines (`addon.cutting.weed`) read the image whe
corners make a parallelogram, the image is placed by its transform as before. Otherwise the native file saves them in
the image's `image_quad` field (top left, top right, bottom right and bottom left of its pixels, in page
coordinates); files without the field open as before. The canvas, printing and every export except DXF, WMF and HP-GL
(an HP-GL plot leaves images out) draw a distorted image as a mesh of affine image pieces, clipped by the corners; no warped copy of the pixels is stored. In
(an HP-GL plot leaves images out) draw a distorted image as a mesh of affine image pieces, clipped by the corners; no warped copy of the pixels is stored. The `.ai` writers write the nearest parallelogram instead at their nesting limit (below). In
printing and exports the mesh takes as many cells as it needs for the pieces to stay within 0.05 pt of the exact
perspective at the points it checks, with cells at least 2 pt long on the corners' longest side, and each piece reaches
0.5 pt into its neighbors. The canvas cuts the mesh for the zoom, by the view's largest stretch: within a quarter of a
@@ -7562,7 +7570,11 @@ screen pixel at the points it checks, with cells at least 4 pixels long, and eac
neighbors. Either way the mesh takes no more than 64 by 64 cells, and no more cells across than the image has pixels on
its longer side (or 8, if that is more). A stronger perspective, or a smaller image, is drawn with the cells it is
allowed. In EMF each piece stores only the pixels inside its clip, with a pixel more on each side. DXF and WMF cannot
clip, so they write the image as the parallelogram nearest its corners and warn. Corners that would fold the image over
clip, so they write the image as the parallelogram nearest its corners and warn. The editing data a `.ai` file carries
writes an image nested 8 deep in opacity masks, symbols, live objects and pattern tiles the same way, and a legacy
`.ai` (version 7) does so for an image nested 8 deep in symbols and live objects; each warns that the image was
written as the nearest parallelogram. Ordinary groups and layers do not count toward that depth. Neither writer
writes an image nested deeper. Corners that would fold the image over
itself, put three corners on one line, join two corners, cross the warp's horizon or lie too close together for a
perspective map are an error, and nothing changes. A transform that squeezes the corners past what a perspective map
can place leaves the image at the parallelogram nearest them. A file whose `image_quad` holds other than four points,
@@ -9132,7 +9144,8 @@ undo step. When a matched layer, or a layer around it, is hidden or locked, the
Drawing modes (`view.drawMode`) apply
too: in Draw Inside, `edit.paste`, `edit.pasteInPlace` and `edit.pasteOnAllArtboards` put the objects inside the
object drawn into (its clip group, made on the first paste), whatever Paste Remembers Layers says; in Draw Behind,
`edit.pasteInPlace` and `edit.pasteOnAllArtboards` put them just below the selection. `edit.pasteInFront` and
`edit.pasteInPlace` and `edit.pasteOnAllArtboards` put them just below the selection, and a placed symbol instance
(`symbol.place`) goes just below the selection too. `edit.pasteInFront` and
`edit.pasteInBack` ignore the drawing mode. When the object drawn into is the one isolation mode isolates (`object.isolate`,
or a double-click on it with the Selection tool), art drawn or pasted inside it takes isolation mode into its clip group,
so the new art can be picked and isn't dimmed; `edit.undo` or `edit.redo` that removes the isolated object ends
@@ -11422,6 +11435,47 @@ hidden state and stay live on the group; none of them is copied onto the glyph p
glyph.
`object.expand` outlines type with this command, so Fill and Stroke expand those paths' gradients, patterns and strokes.
`type.retype` (Type › Retype) turns outlined glyphs back into point text. By default a shape must be exactly a glyph of
an available font. With `tolerance` (0 to 0.05), a shape of at most 8 contours that is no glyph exactly becomes the
glyph it is closest to when its leftover distance from that glyph, relative to the shape's outline spread (the root
mean square distance of its sampled outline points from their center), is at most the
tolerance: an outline simplified, a curve split in two, or contours in another order, start or direction. The tolerance
and this measure are VectorCraft's own. A near-matched glyph may differ from its line by the tolerance in size, turn
and place; an exact glyph keeps the exact limits unless the line's first glyph, whose size and turn the line takes, is
a near match. The line also splits before a near-matched glyph, or a glyph of a line whose first glyph is one, that
the type would draw further from its shape than the tolerance by the same measure (its own leftover distance together
with the change of size and turn) or with its center further away than its origin may be. Each entry of `fonts` in the result has a `score`, from 1 when every glyph of the line is exact down to 0
at a leftover distance of 0.05. A compound path that holds several
glyphs, such as a word made into one compound path, is split into groups of contours (a contour with the contours
inside it) in path order, and runs of up to three groups are matched, the longest first among those after which the
remaining groups can still all be matched, so an i's stem and dot become one i. A group whose contours run the other
way round, as Make Compound Path leaves some of them, still matches exactly. Exact matches of the whole shape come
first, then exact matches of its groups, then near matches of the whole shape, then near matches of its groups. The
compound becomes type only when every one of its glyphs does; otherwise it stays as it is and is reported once in
`unmatched` when another shape of the selection becomes type, and the command returns an error when no shape does. A
glyph also has to paint the area the shape paints under the shape's fill rule: a compound filled by the nonzero rule
whose inner contour runs the same way as its outer one paints its center, so a ring glyph does not replace it. A shape with a counter narrower than three times the
outline tolerance across in some direction, turned or not, cannot be checked this way and stays an outline: at `tolerance` 0.05, a
counter 10 units wide in a 100 by 100 shape, or a 60 by 10 one turned 45 degrees. So does a shape whose outline is too large to check. The glyphs of a compound path that splits into several are set one beside
another, so a split whose parts overlap where the shape's fill rule leaves the overlap unpainted (two o's on each
other under the even-odd rule) stays an outline. A split whose parts overlap at all also stays an outline when the
compound has an opacity below 100%, a blend mode other than Normal, a gradient or pattern fill or a stroke, since the
glyphs may become separate objects that paint the overlap twice. When the split with the longest runs fails that check, the split with the
shortest runs is checked, then the other complete splits in order, up to 32 splits per shape for exact matches and 32
for near matches; when none passes, the shape stays an outline. Glyphs fused into one contour are not split, and a compound path of more than 256 groups, 512 contours
or 65,536 path elements is matched whole only. One command groups at most 16,384 contours, in selection order; the shapes after them are
matched whole only. Near matching compares a shape with at most the 256 glyphs closest to it in proportion, in at
most 50 million point comparisons per shape and 2 billion per command, ranking a glyph by proportion counting as one
comparison per contour and one more; past them, the glyphs not yet ranked or compared are left out. It looks glyphs up for at most 1,024 distinct shapes and runs per command: every selected shape first, in
selection order, then the runs of groups of the compound paths. Glyphs close only to the shapes and runs past that
limit are not looked up. At most 262,144 glyphs are drawn to check whether they could near match, and at most 32,768
are indexed for it, each face taking an equal share of both; of a face's glyphs, those closest to the selected shapes
in proportion are indexed.
```json
{"name":"run_command","arguments":{"command":"type.retype","params":{"tolerance":0.02}}}
```
`type.createOutlines` (Type › Create Outlines) and `effect.expandAppearance` (when it outlines type, as Expand
Appearance describes) take an outlined frame of threaded text out of its thread with the text it shows, and the other
frames keep the text they hold. When the thread's last frame is outlined, the text it has no room for, which its
@@ -12578,7 +12632,7 @@ on an open path that are not drawn because they fall before the path's start can
## Retype tracking
`type.retype {fonts?}` turns selected outlined text back into point text when its shapes are glyphs of a font the app
has. A line of three or more glyphs gets the spacing that most of its gaps share as its tracking, in 1/1000 em. Retype
has. A line of three or more exactly matched glyphs (none a near match, see `tolerance`) gets the spacing that most of its gaps share as its tracking, in 1/1000 em. Retype
tries the value rounded to a whole number first when it is within 0.05 of one, then the value as measured. The font's
advances and pair kerning are left out of the measure, and word spaces are counted after the tracking. The tracking is
kept when the tracked type draws the whole line in place, or more of it from its start than untracked type does. When
@@ -12605,7 +12659,7 @@ that glyph. This rule is VectorCraft's own.
## Retype several lines
`type.retype` joins lines that follow each other in paint order, with the same group, paint, font, size, turn and
`type.retype` joins lines that follow each other in paint order (lines split from one compound path do), with the same group, paint, font, size, turn and
tracking (an untracked line of one or two glyphs takes the tracking of the others), into one type object when each
line's baseline is the same distance below the one before (between 0.25 and 3 times the size) and the lines line up at their starts, ends or centers. The object is area type with Convert To Area
Type's frame, its lines separated by line breaks, with left, right or center alignment, checked in that order. Its
@@ -12627,7 +12681,8 @@ the result's `texts` list holds an object's lines joined by `\n`, and each entry
`type.retypeFonts {count?}` lists the fonts whose glyphs match the selected outlined text. It compares each selected path
and compound path, inside groups too, with the glyphs of up to 96 loaded fonts, those of the document's live type
first, by the matching `type.retype` uses, and it counts only exact matches. When two versions of a font are loaded,
first, by the matching `type.retype` uses, and it counts only exact matches of whole shapes: it does not split a
compound path into glyphs or take near matches. When two versions of a font are loaded,
only the version its family and style name gives is compared, which is the version that choosing the font sets. The
fonts rank by how many shapes each matches, then by the mean distance left after fitting, then by family and style
name. `count` is a whole number from 1 to 96 (default 10); any other value is an error. The reply is
@@ -13220,7 +13275,8 @@ session and refuses `--connect`. In Safe Mode no plug-in loads or
runs: `plugin.install`, `plugin.run`, `plugin.reload` and exporters return an error, and a live-effect plug-in draws its
object's geometry unchanged while the object keeps the effect: `effect.list` gives that effect `skipped: true`, and the
Appearance panel shows "(Safe Mode)" after its name and the plug-in's id in its tooltip. `effect.expandAppearance` returns an
error and changes nothing when an object it would expand holds such an effect, in it or in a symbol it places. `vectorcraft` rejects an option it does not know (such as
error and changes nothing when an object it would expand holds such an effect, in it or in a symbol it places. That includes a
plain symbol instance in a group or layer with a raster effect, since the group's image draws the symbol's art. `vectorcraft` rejects an option it does not know (such as
`--safe-mod`) instead of opening it as a file; `--` before a file name that starts with `-` opens it. The web build keeps
no installed plug-ins from one page load to the next and has no launch marker, so it never offers the choice. `plugin.safeMode` returns `{active, source, disabled,
pendingItem}`; a command does not turn Safe Mode on or off. `plugin.setEnabled {id | file, enabled}` turns a plug-in on or
@@ -14199,8 +14255,11 @@ away); its click on a gradient mesh's line picks the line's two
ends, and a click inside a patch picks the four points around it. The picked points show filled. Dragging one of them
moves them all as one undo step (`object.mesh.movePoints`), a click on one of several picked points picks it alone,
and the arrow keys nudge them by the keyboard increment. The active tool lists them in its options
(`tool.setOption {}` returns them as `meshPoints: [{id, index}…]`). Switching to the Eyedropper keeps them picked, its
options list them too, and the Mesh tool, Direct Selection or a Lasso chosen next picks them again. While a selected, editable mesh has
(`tool.setOption {}` returns them as `meshPoints: [{id, index}…]`). Switching between the Mesh tool, Direct Selection,
the Lasso, the Polygonal Lasso and the Eyedropper keeps them picked, and so does a Cmd/Ctrl-click with the selection
tool one of them lends; any other tool, Group Selection included, drops them. A plain Lasso click away from the art
(`select.none`) unpicks them. The Eyedropper's options list them too.
While a selected, editable mesh has
points picked, an Eyedropper click or Shift-click on an image or other art samples the color under the pointer into
those points alone as `paint.sampleColor {color, stroke: false, ids}` with the meshes that have points picked: one undo
step, none when the color is unchanged. Other selected objects keep their paint. A click on one of those meshes, and
@@ -14504,8 +14563,10 @@ Tools:
undo step. A circle too small or too large for its three points to give it back in floating point counts as no
circle. Shift pressed or let go during a click counts at the release. With no circle the note shows, a click draws
nothing and the first segment stays picked; it also stays when drawing the circle fails or the press on the second
segment is canceled (a canceled touch). Escape, an edit, Undo or Redo outside the tool, or another document forgets
the first segment.
segment is canceled (a canceled touch). Escape, an edit, Undo or Redo outside the tool, another document, or a
change to the first segment that makes no undo step (a live preview, or one that was canceled) forgets the first
segment. The circle is looked for again whenever either segment no longer has the shape it was found on, so a
canceled preview does not leave a circle worked out on the previewed paths.
Option (`tool.setOption`, or a double-click on the tool): `radius` (pt, 0.01 to 1000000, 36). `tool.setOption`
gives an error for a value outside that range or one that is not a number, and for any other option.
- **Trim at Crossings Tool** (`trimAtCrossings`): removes stretches of paths between the places where they are crossed,
+7 -4
View File
@@ -353,10 +353,13 @@ each time it is drawn, and a paint linked to a global swatch is drawn in that sw
## ABI v1
A plug-in is a core WebAssembly module (MVP + the usual post-MVP features: bulk memory, sign extension, multi-value,
saturating conversions; no SIMD, no memory64) with these exports and no imports other than the [host
imports](#host-imports-api-level-2) of API level 2. Integers are `i32` unless noted; pointers are offsets into the
module's memory.
A plug-in is a core WebAssembly module (MVP + these post-MVP features: mutable globals, sign extension, saturating
conversions, multi-value, bulk memory, reference types, tail calls and extended constant expressions) with one memory,
these exports and no imports other than the [host imports](#host-imports-api-level-2) of API level 2. Before wasmi reads
a module, the host validates it with only these features on, and refuses a module that uses any other feature. The error
names the feature for SIMD, relaxed SIMD, memory64, multi-memory, custom page sizes, wide arithmetic, threads,
exceptions, function references and garbage collection. Integers are `i32` unless noted;
pointers are offsets into the module's memory.
| Export | Signature | Meaning |
|---|---|---|
+10 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -56,7 +56,7 @@ against Illustrator's public documentation; **estimated** unless noted.
| Alt + numeric-keypad codes while typing (Windows: `Alt+0176` → °) | partial | #5108: on Windows the character Windows posts when Alt comes up after keypad digits is typed at the caret like any other, in the typing's undo step, and the keypad digits typed with Alt run no shortcut. With NumLock off the keypad keys (Insert, End, arrows, Clear, Home, Page Up/Down without the extended-key flag) count as digits too and don't move the caret (`windows_alt_codes` unit tests; neither NumLock on nor off has been tried on a Windows machine yet). `type.insert {code}` (Windows Alt+0 code, Windows-1252 for 128–159) and `{unicode}` (hex code point) insert a character by its code (`menucmds::insert_a_character_by_its_code`). macOS and Linux have no such system convention and egui reports a keypad digit as the top-row digit, so there it does nothing; a floating panel window doesn't receive the character |
| Caret: the arrows and Delete step over whole clusters (Thai consonant with its marks, combining accents, emoji); Backspace removes one character | done | in text with right-to-left characters the arrows move in visual order and stop on both sides of a character drawn with no width, such as a zero width non-joiner |
| Touch Type tool | done | moves, scales and rotates one character through its kerning, baseline shift, scales and rotation (`text.touchType`); a character with a preceding logical character on the same line can move along the line in either reading direction; the first logical character moves only up and down. Positive `dx` follows reading order. These direction rules are VectorCraft's choices. |
| Retype (identify fonts in outlines/images) | partial | Phase 1 (#4934): Type › Retype (`type.retype`) turns outlined glyphs back into type when each shape is exactly a glyph of a loaded font, a font the document uses or a family named in `fonts` (the same up to uniform scale, rotation and translation): one object per line unless lines stack into one object as described below, in that font and size, at the same baseline and turn, with the first glyph's fill and stroke, in one undo step; shapes that match no font stay as they are and are reported. Evenly spaced glyphs keep their spacing as tracking (gaps one space wide stay word spaces when type draws them), and lines stacked at one leading and lined up at their starts, ends or centers become one area type object with that leading and alignment (VectorCraft's own rules, checked against the layout). Window › Retype shows the Retype panel, which lists the fonts whose glyphs exactly match at least one selected outlined shape, comparing up to 96 loaded fonts with those of the document's live type first, ranked by how many shapes each matches, with samples, and sets a listed font on selected live type (`retype.find`, `type.retypeFonts`). Missing (phase 2): near or fuzzy matches (another version of the font, simplified outlines, glyphs merged into one path), opening the panel from the Type menu, the context menu and the Properties panel's Quick Actions, filtering the list by font source and favorites, installed fonts not yet loaded, text in images. Public behaviour: [identify fonts](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/identify-fonts-using-retype.html), [apply to live text](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/apply-retype-suggested-fonts-to-live-text.html) |
| Retype (identify fonts in outlines/images) | partial | Phase 1 (#4934): Type › Retype (`type.retype`) turns outlined glyphs back into type when each shape is exactly a glyph of a loaded font, a font the document uses or a family named in `fonts` (the same up to uniform scale, rotation and translation): one object per line unless lines stack into one object as described below, in that font and size, at the same baseline and turn, with the first glyph's fill and stroke, in one undo step; shapes that match no font stay as they are and are reported. Near matches: with `tolerance` (0 to 0.05), shapes of up to 8 contours whose leftover distance from a glyph, relative to the shape's outline spread (the root mean square distance of its sampled outline points from their center), is at most the tolerance (simplified outlines, curves split in two, contours in another order or direction) match too, and each line reports a `score`; a compound path holding several glyphs is split into them and becomes type only when all of them match. A line of three or more exactly matched glyphs keeps the spacing most of its gaps share as tracking (gaps one space wide stay word spaces when type draws them). A line of two glyphs that untracked type does not draw in place takes the tracking of the nearest tracked line in the same font, size and turn, and keeps it only when type at that tracking draws both glyphs in place; a line of one or two glyphs that joins tracked lines in one object takes their tracking. Other lines are set untracked, each glyph at its own position, and lines stacked at one leading and lined up at their starts, ends or centers become one area type object with that leading and alignment (VectorCraft's own rules, checked against the layout). Window › Retype shows the Retype panel, which lists the fonts whose glyphs exactly match at least one selected outlined shape, comparing up to 96 loaded fonts with those of the document's live type first, ranked by how many shapes each matches, with samples, and sets a listed font on selected live type (`retype.find`, `type.retypeFonts`). Missing (phase 2): glyphs fused into one contour, near matches and compound paths of several glyphs in the panel's list, opening the panel from the Type menu, the context menu and the Properties panel's Quick Actions, filtering the list by font source and favorites, installed fonts not yet loaded, text in images. Public behaviour: [identify fonts](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/identify-fonts-using-retype.html), [apply to live text](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/apply-retype-suggested-fonts-to-live-text.html) |
| Snap to Glyph | done | View › Snap to Glyph (`view.snapToGlyph`): with Smart Guides on, new point type and drawing tools snap to live-text baselines and glyph bounds, the corners of each glyph's box included, turning with rotated type (#5112; `guides::tests::a_drawn_point_lands_on_a_corner_of_a_glyphs_bounds`, `Targets::for_drawing`, `tools::text_tests::snap_to_glyph_lines_up_new_point_type_with_a_baseline`). With Alignment Guides on as well, and Snap to Grid and Snap to Pixel off, both ends of a Measure or Measure & Inspect drag snap to those guides and show them during the drag (`Targets::for_measure`, `xform::measure::tests::its_ends_land_on_glyph_guides_with_snap_to_glyph`). That the Measure tools take the guides is VectorCraft's choice; they leave out Anchor Point, which [the help page](https://helpx.adobe.com/illustrator/desktop/design-with-text/special-characters-glyphs/snap-to-glyph.html) limits to the Pen tool and objects moved with the Selection tool. Character panel menu › Show Snap to Glyph Options: Baseline, x-height, Glyph Bounds, Proximity Guides, Angular Guides and Anchor Point each turn their guides on or off (`view.snapToGlyph.options`, all on by default; #4232), after a Snap to Glyph checkbox for View › Snap to Glyph; showing them scrolls the panel to them (#5273) |
| Thai, Lao, Khmer, Myanmar: shaping (marks, reordering), lines broken between words, word-by-word caret and double-click | done | words found by ICU4X's line segmenter: dictionaries on the desktop, LSTM models on the web |
| Middle Eastern: bidirectional layout, Paragraph Direction | done | PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import still needs ActualText support (#6165); separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. |
+13 -3
View File
File diff suppressed because one or more lines are too long