mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 12:17:14 -06:00
Fix #429: Type on a path brackets, flip and Type on a Path Options that keep the type in place
Type on a path could only be repositioned by Type on a Path Options, whose menu item sent
`{start: 0}`, so OK threw the text to the start of its path; nothing showed or dragged its
brackets. Now, as in Illustrator:
- Type on a path flows between a start and an end bracket (`TextKind::OnPath { end }`, None:
the end of the path or once round a closed one; `TextKind::path_span`). Flipping
(`TextObject::flip_on_path`) reverses the path keeping a closed path's first anchor and swaps
the brackets, so the type keeps its stretch of the path.
- Type on a Path Options gains Align to Path (ascender, descender, center, baseline) and
Spacing (glyphs spaced as if set that far above the path: closed up round the outside of
curves, opened up round the inside), laid out by the text engine.
- `type.pathOptions {start?, end?, flip?, effect?, alignToPath?, spacing?, ids?}` sets them in
one undo step; with none of them it queries. The menu item opens the dialog with the selected
type's Effect, Flip, Align to Path and Spacing (dropdowns for the choices) and leaves the
brackets alone, so OK as opened changes nothing.
- The Selection and Direct Selection tools show selected type on a path's path and its start,
centre and end brackets (`tools::pathtype`, with a bracket cursor): dragging the start or end
bracket sets where the type runs, dragging the centre bracket slides it along the path and,
across the path, flips it (Cmd/Ctrl held: it only slides). Each drag is one undo step.
- Arc-length measuring moved to `vectorcraft_geom::ArcPath` (layout, the tools and
`text.createInPath` share it). SVG export outlines path type whose end bracket, alignment or
spacing `<textPath>` can't express.
- docs/mcp.md documents the command and the drags; ROADMAP updated; dialog strings translated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
696d9f619b
commit
1706e84829
+19
@@ -2029,6 +2029,25 @@ undo step. Object › Transform › Scale, the Scale tool and the Transform pane
|
||||
{"name":"run_command","arguments":{"command":"text.reshapeArea","params":{"id":42,"anchors":[[0,2]],"dx":40,"dy":60}}}
|
||||
```
|
||||
|
||||
## Moving and flipping type on a path
|
||||
|
||||
Type on a path flows between a start and an end bracket, stored as fractions of its path's length.
|
||||
`type.pathOptions {start?, end?, flip?, effect?, alignToPath?, spacing?, ids?}` sets them and the rest of Type on a
|
||||
Path Options: `end: null` puts the end bracket back at the end of the path (or once round a closed one); `flip`
|
||||
then turns the type to the other side of its path, the path running the other way and the brackets swapping ends so
|
||||
the type keeps its stretch of the path; `alignToPath` runs the `ascender`, `descender`, `center` or `baseline` (the
|
||||
default) along the path; `spacing` (points) closes glyphs up round the outside of curves and opens them up round the
|
||||
inside. With none of them it queries the first selected type on a path:
|
||||
`{start, end, flip: false, effect, alignToPath, spacing}`. The Options dialog shows Effect, Flip, Align to Path and
|
||||
Spacing and leaves the brackets where they are. As in the reference app, the Selection and Direct Selection tools
|
||||
show selected type on a path's brackets: dragging the start or end bracket (`pointer_gesture`) sets where the type
|
||||
begins or ends, dragging the centre bracket slides the type along its path and, dragged across the path, flips it
|
||||
(with Cmd/Ctrl held it only slides). Each is one undo step.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"type.pathOptions","params":{"start":0.25,"end":0.75,"flip":true}}}
|
||||
```
|
||||
|
||||
## Constrain proportions
|
||||
|
||||
The link between W and H in the Transform panel, the Properties panel and the Control bar is the
|
||||
|
||||
Reference in New Issue
Block a user