mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 13:22:18 +00:00
Merge pull request #6829 from dotCooCoo/feat/dynamic-text-point-type
Type: Dynamic Text turns point type into area type with Block on
This commit is contained in:
+20
-7
@@ -7136,8 +7136,8 @@ chosen artboards draw all of them. A PDF leaves out the layers that don't print
|
||||
### Dynamic Text: Block
|
||||
|
||||
`type.dynamicText {ids?|id?, on?: bool, wordGap?, lineGap?}` (Type › Dynamic Text, and the Contextual Task Bar for
|
||||
area type outside a thread) turns Block on or off for the
|
||||
selected area type, as it turns Dynamic Text on or off for type on a path ([Dynamic Text](#dynamic-text)). Area Type
|
||||
area type outside a thread and for point type) turns Block on or off for the
|
||||
selected area type, and turning it on makes point type area type with Block on (below), as it turns Dynamic Text on or off for type on a path ([Dynamic Text](#dynamic-text)). Area Type
|
||||
Options › Block is the same setting, and the Properties panel's Paragraph section has a Dynamic Text checkbox, which
|
||||
shows Word Gap and Line Gap while it is on. The [Dynamic Text overview](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/dynamic-text-overview.html)
|
||||
describes Block as text that scales to fill a rectangular box, with settings for the spacing between words and between
|
||||
@@ -7151,7 +7151,7 @@ lines. The rest are VectorCraft's own rules:
|
||||
- The layout sets every paragraph with `wordGap` as its Desired word spacing (Justification…), and its Minimum or
|
||||
Maximum word spacing moves out to `wordGap` when `wordGap` lies outside it. The paragraphs keep their own
|
||||
Justification… values, which apply again when Block is off. Each character's leading is its size plus `lineGap`. A
|
||||
gap given with no area type in the selection is an error.
|
||||
gap given with no area type in the selection, and no point type that it turns into area type, is an error.
|
||||
- The sizes are written into the characters, so every export and the Character panel see them. After every edit to
|
||||
the text or the frame (typing, `text.editRange`, character and paragraph changes, `text.areaOptions {width}`, a
|
||||
frame resize) the lines are fitted again, in the edit's own undo step. The lines are then measured again, in at
|
||||
@@ -7160,14 +7160,27 @@ lines. The rest are VectorCraft's own rules:
|
||||
- An empty line, or a line of spaces, keeps its size. At 1,296 pt a line can be narrower than the frame; at 0.1 pt it
|
||||
can still wrap. A frame with no room along its lines changes nothing. Right-to-left lines are fitted as left-to-right
|
||||
ones are.
|
||||
- Off keeps the sizes the text was drawn at. On replaces Auto Size and Shrink Text to Fit. Point type in the selection
|
||||
is left as it is. Area type in a thread is refused with an error that names it (`text.areaOptions {fit: "block"}`
|
||||
- Off keeps the sizes the text was drawn at. On replaces Auto Size and Shrink Text to Fit. Area type in a thread is refused with an error that names it (`text.areaOptions {fit: "block"}`
|
||||
refuses it too); threading a frame turns Block off, keeping its sizes. Without `on`, it toggles from the first
|
||||
object's setting, or turns on when a gap is given. A value that is not a boolean, or a gap outside its range, is an
|
||||
error. When nothing changes, no undo step is recorded.
|
||||
- Saved and opened, the native file keeps Block on with its gaps and the sizes in the characters; with Block off it
|
||||
keeps the sizes.
|
||||
|
||||
Turning it on also takes point type, in the same undo step (the Contextual Task Bar offers it beside Convert To Area
|
||||
Type). [Adjust formatting and resize text](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/adjust-formatting-and-resize-text-with-dynamic-text.html)
|
||||
applies Dynamic Text, Block among its shapes, to existing text. VectorCraft's own rules for point type:
|
||||
|
||||
- It becomes area type with Block on and the default Area Type Options, keeping only its gaps: options it kept from
|
||||
an earlier frame (columns, inset, vertical alignment, first baseline) do not carry over. Along its lines, the frame
|
||||
is as wide as the widest line as typed with its paragraph's indents, so that line keeps its size and stays where it
|
||||
was across the page by its own alignment; the other lines are set to that width. When negative indents take more
|
||||
than the widest line's width, the frame is as wide as that line, and Block makes it larger. The frame starts at the
|
||||
top of the text and then grows down (to the left for vertical type) to hold every fitted line, around any Text Wrap
|
||||
objects above it, so nothing overflows.
|
||||
- The gaps given apply to its frame. Point type with no line to fit (empty, or only spaces and breaks) is left as it
|
||||
is, and so is point type when `on` is false. Without `on`, point type counts as off.
|
||||
|
||||
The reply is `{on, ids, fitScale, wordGap, lineGap}` (`fitScale` as for type on a path, 1 when the first object is area
|
||||
type; the gaps are the first area type's).
|
||||
|
||||
@@ -8023,8 +8036,8 @@ and tate-chu-yoko offsets by one factor, so runs keep their proportions; Type on
|
||||
scaled. The first character's size, in document points, moves in steps of 0.1 pt within 0.1 to 1,296 pt; text that
|
||||
still runs past the end bracket at 0.1 pt overflows. Reshaping or scaling the path fits the text again. The stored
|
||||
sizes do not change: turning Dynamic Text off writes the sizes the text was drawn at into its characters, so it keeps
|
||||
its look, in one undo step. Point type in the selection is left as it is, and area type in it takes Block
|
||||
([Dynamic Text: Block](#dynamic-text-block)). Type on a path in a
|
||||
its look, in one undo step. Area type in the selection takes Block, and turning it on makes point type in the
|
||||
selection area type with Block on ([Dynamic Text: Block](#dynamic-text-block)). Type on a path in a
|
||||
thread is refused with an error that names it, and the menu item and the task bar item are not offered for it;
|
||||
`text.thread.create` and `text.thread.add` turn Dynamic Text off on the frames they thread, at their drawn sizes, and
|
||||
list them in `dynamicTextOff`; `addon.type.releasePath` turns it off at the drawn sizes on the point type it makes. When every object already has the setting asked for, nothing changes and no undo step
|
||||
|
||||
@@ -1204,6 +1204,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
Type on a Path Options › Align to Path (option names as in [Create type on a path](https://helpx.adobe.com/illustrator/desktop/design-with-text/edit-format-text/create-type-on-a-path.html)) moves each character by its own font, size and vertical scale: Ascender runs the top of the font's em box along the path (the ideographic em box that its `BASE` table, its typographic or `hhea` box or its ideographs give, else an em box centered on the cap height), Descender runs the bottom of the font's bounding box along it, and Center runs a line at half the height of the top of the font's H above the baseline along it. In vertical type, Ascender and Descender move the characters half an em, and Center leaves them on the path. These distances are VectorCraft's own values (`tests::on_path_align_runs_each_glyph_by_its_own_metrics`, `tests::on_path_align_finds_the_em_box_of_each_kind_of_face`, `tests::on_path_align_in_vertical_type_moves_half_an_em`).
|
||||
Type › Dynamic Text (`type.dynamicText`, also on the Contextual Task Bar for type on a path) sizes type on a path to fill the span between its start and end brackets and fits it again after each edit to the text or a bracket ([Dynamic Text overview](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/dynamic-text-overview.html), [start and end points](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/reposition-start-and-end-points.html)). VectorCraft's own rules: reshaping or scaling the path fits the text again; one factor scales every size, leading and baseline shift; the first character's size moves in 0.1 pt steps within 0.1 to 1,296 pt; turning it off, threading the type or Release Type on a Path keeps the drawn sizes; SVG, EPS, legacy `.ai` and the editing data write the drawn sizes (`crates/text/src/tests/fit.rs`, `crates/engine/src/tests/dynamic_text.rs`).
|
||||
Dynamic Text on area type is Block (Type › Dynamic Text, the Contextual Task Bar, Area Type Options › Block, the Properties panel's Dynamic Text checkbox with Word Gap and Line Gap; [Dynamic Text overview](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/dynamic-text-overview.html)): each line as typed is set to the frame's width by its font size, again after every edit to the text or the frame. VectorCraft's own rules: lines are not broken again, the first character's size moves in 0.1 pt steps within 0.1 to 1,296 pt, Word Gap (0 to 1,000 %, default 100) is the Desired word spacing and Line Gap (-1,296 to 1,296 pt, default 0) is added to each size for the leading, the sizes are written into the characters, threaded frames cannot use it, and Convert To Point Type turns it off, keeping the sizes (`crates/engine/src/cmd/typecmd/block_tests.rs`).
|
||||
Dynamic Text on point type (Type › Dynamic Text, the Contextual Task Bar; [Adjust formatting and resize text](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/adjust-formatting-and-resize-text-with-dynamic-text.html) applies it to existing text) turns it into area type with Block on. VectorCraft's own rules: the frame is as wide as the widest line with its indents, so that line keeps its size and place across the page, and it grows in depth to hold every fitted line (`crates/engine/src/cmd/typecmd/block_tests.rs`).
|
||||
Type › Dynamic Text Presets › Circle, Arch and Bow (`type.dynamicTextPreset`) put point type or type on a path on a circular, upward-curving or downward-curving path with Dynamic Text on, with the text's position against the path (above, center, below) and its direction ([Dynamic Text overview](https://helpx.adobe.com/photoshop/desktop/text-typography/work-with-dynamic-text/dynamic-text-overview.html)). VectorCraft's own rules: the circle is as wide as the text and the text starts at its bottom; Arch and Bow are a 120° arc whose chord is as wide as the text; above, center and below are Align to Path's Descender, Center and Ascender (`crates/engine/src/tests/dynamic_text.rs`).
|
||||
The frames of threaded text share one Optical Margin Alignment setting: turning it on or off in one frame sets it in every frame, threading frames gives the thread its first frame's setting, and frames taken out of a thread keep it.
|
||||
The frames of threaded text share one writing direction: Type › Type Orientation (`type.orientation.vertical`, `type.orientation.horizontal`) in one frame sets every frame, threading frames gives the thread its first frame's direction, frames taken out of a thread keep theirs, and the story flows through every frame in the thread's direction.
|
||||
|
||||
Reference in New Issue
Block a user