Hidden and locked shapes stay outlines and end the line. Isolated and
knockout groups keep their type inside. Type turned 180 degrees stays
one object (angles compared wrapped). A lone one-contour glyph beside
other shapes stays an outline unless it is the only shape selected.
The index samples only glyphs whose key (segments per contour) a selected
shape has, reads outlines past the shared outline cache, keeps each
face's keys once worked out, and loads no more faces than it takes. With
Microsoft YaHei (29,905 glyphs) loaded: 877 ms the first time, 23 ms
after.
Shapes with more than a basic appearance (several fills or strokes,
effects, item transparency, brushes, width profiles, arrowheads) stay
outlines. The stroke's caps, joins, miter limit, dashes and alignment
carry over. A line's glyphs share one size and turn exactly, and a first
glyph its line cannot draw is tried on its own.
Each retyped line is laid out and compared glyph by glyph with the
outlines; it splits where its type would draw another glyph or the same
glyph elsewhere (tracking, manual spacing, font substitutions), and a
glyph its type cannot draw stays an outline. Shapes with their own
opacity mask stay outlines. Shapes past the limits are reported as
truncated. Glyphs of plain-shape symbols (box drawing, blocks, geometric
shapes, private use) are not matched, so drawn rectangles stay art.
Type › Retype is in the Type menu.
A selected object that yields no shape between two selected glyphs (live
type, an open path) ends the line, as it does inside a group. Tests for
that and for glyphs selected inside different groups.
List type.retype among the commands plugins may call. Only closed shapes
match glyphs. Live type, images and other art between glyphs, and
unselected art between selected objects, end the line. Each selected
object's own parent decides its group. Retyped type turns ligatures off,
as the outlines drew each glyph on its own.
An unmatched shape between glyphs ends the line, so the type after it is
still painted over it. Glyphs of different groups, paint or transparency
never share a line, and the new type takes the glyphs' own opacity and
blend mode. The type names the font version that matched. The glyph
budget holds inside a face too.
type.retype turns selected outlined text back into live point text when
each glyph 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. Matched glyphs map back to characters through the cmap
and become point text in that font and size at the same baseline and
turn, one object per line, with the first glyph's fill and stroke, in one
undo step. Shapes that match no font stay and are reported.
Matching (vectorcraft_text::retype) samples each contour at equal steps of
arc length and fits a similarity transform; it is bounded (faces, glyphs,
path elements, contours) and panic-free. Near matches, the ranked font
list, installed fonts not yet loaded and images are phase 2.
Object › Transform › Rotate Bounding Box… asks for an angle and turns the
bounding box of the selected objects by it, leaving their art where it
is. Reset Bounding Box squares it again.
- object.rotateBoundingBox {angle, absolute?}: by default the box turns
by angle from the angle the selected objects share (0 when theirs
differ); absolute: true turns it to angle. Objects with different
angles get one shared angle, and the objects inside a group or a
linked opacity mask turn with it and keep their relative angle. A path
of a compound path selected on its own turns only its own box, the
same objects the transforms move. An angle within 1e-6° of 0 is
stored as 0. One undo step, none when every box is already at the
angle. A missing or non-numeric angle is an error. changed counts
every box that turned, as object.resetBoundingBox counts the boxes it
squares.
- object.resetBoundingBox squares only the box of a compound path's
path selected on its own, instead of the whole compound path.
- Menu labels in every catalog.
Docs: docs/mcp.md, docs/target-app-parity.md.
Part of #5954.