Port main's new variable-library parsing (variable kinds, image, visibility
and graph values) from roxmltree to craft-xml with the branch's strict
options and attribute validation. Keep both sides' variable tests.
Drop the stale docx::nesting doc link.
Type > Composite Fonts... has Custom: named character sets, each setting
the characters it lists in its own font, style, size, baseline and
scales ahead of their class. The later of two sets that list a character
sets it. Characters are added by Direct Entry or by Unicode code and
deleted one at a time, and the parts table scrolls when it grows.
- type.compositeFonts.set takes `custom`; part keys left out take the
Kanji part's values. Sets are saved with the document and in
.vccomposite files, and Export refuses a file over 4 MB.
- VectorCraft's own limits: 64 sets per font, 8,192 characters per set,
each character once per set, up to U+FFFF and no control characters.
- The font database caches each font's character lookup.
Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.
The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.
Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
On a path or compound path, a Transform effect listed after the
object's own Rasterize effect now moves the image that Rasterize makes.
The image is made of the art before the Transform effect, at the
Rasterize effect's resolution and with its room around the art, and the
Transform effect scales, turns, reflects and moves it. Before, the
Transform effect moved the art and Rasterize made a new image of the
moved art on a grid square to the page.
- effects: rasterize_stage finds the Transform effects that move the
last Rasterize image; stage_map composes their maps about the
reference point of the art each one takes.
- render: the canvas draws the node without those Transform effects
through the map, and its drawn and painted bounds follow the map. A
map that scales the image to nothing draws nothing.
- engine: Expand Appearance places Object > Rasterize's image of the
art through the map, and PDF export makes those images before it
bakes the geometry effects.
A Transform effect that makes copies or moves at random, one followed
by another kind of effect, a fill's or stroke's own Rasterize effect,
and Rasterize on type, images, symbol instances and groups keep the
earlier behavior.
A Transform effect listed after Underpainting, Rough Pastels, Conte
Crayon, Bas Relief, Plaster or Texturizer now turns and reflects their
light direction, and after Sprayed Strokes or Graphic Pen their stroke
direction. Each is set to the nearest choice of its menu, the one
clockwise of it at a tie. Color Halftone's four screen angles turn and
reflect with the art. Stacked Transform effects, and an object's
Transform effect over a fill's own, round the direction once. A zero
scale leaves the direction as it is.
The canvas, export and Expand Appearance use the same values. Filters
with fixed stroke or pattern axes keep them.
Type on an open path can now start before the path's start: its start
is stored below 0, the span runs from there, and the characters whose
middle falls before the path's start are not drawn, as SVG 2 lays out
text on a path (https://www.w3.org/TR/SVG2/text.html#TextLayoutPath).
The text keeps every character, and the start bracket stays at the
path's start. Past the path's end, text that does not fit is overflow,
as for other type on a path. Type that starts on the path draws every
glyph as before.
- SVG import keeps a <textPath> start before an open path's start
(text-anchor end or middle, or a negative startOffset) instead of
starting the text at the path's start, which drew every character.
- SVG export writes it as a negative startOffset.
- PDF export writes only the characters drawn on the path.
- The legacy .ai and .ai editing data writers write the type from the
path's start with the type attributes warning.
- type.pathOptions takes a start below 0 for type on an open path; on a
closed path it is the path's start, as before. A flip starts the type
at its start bracket. Dragging the center bracket slides it from where
it starts, and no further before the path.
- A click at the path's start places the caret by the first drawn
character, and the caret in the hidden characters stands at the
path's start. The highlight of substituted fonts and glyphs leaves
them out.
- Release Type on a Path keeps the first drawn glyph where it was
drawn, with the hidden characters before it.
- The Touch Type tool shows no box for a hidden character, and
text.touchType returns an error for one. A character with a drawn
glyph is changed by that glyph.
Docs: docs/mcp.md, docs/target-app-parity.md.
Effect > Blur > Radial Blur... has a Blur Center box. A press or a drag
in the box sets the point the spin or zoom starts from, the arrow keys
move it 1% (10% with Shift), and Horizontal and Vertical fields take the
same position in percent. Screen readers get the box with both values.
- blur.radial takes centerX and centerY, from 0 to 1 across and down the
object's bounds (0.5 each by default), so the center moves and scales
with the object. An effect saved without them draws as before.
- effect.apply and effect.setParams refuse a value outside 0 to 1, or
one that is not a number; a saved one draws at the nearest edge.
- The raster's margin is measured from the center, and the center stays
in the object's own bounds when a Rasterize splits the stack.
- Params text, docs/mcp.md, the evidence line in
docs/target-app-parity.md and a Blur Center row in every catalog.
This reverts commit bada8e1710. #7638 merged with its gate failing: besides six unformatted
files, render and trace don't compile against craft-libs e2dc681 (u64::from(usize) in
render/src/paint.rs, a private craft-libs function, and a call with one argument too many in
trace/src/opaque.rs), so main's CI fails. The tree is that of 0adbdce6cb, whose CI passed.
While a document's composite fonts are lent, type naming a composite font
the document does not define is set as in a missing font, even when the
front document or the document a placed document sits in defines one of
that name. A document that defines no composite font gets an empty scope
too, so a document in the back, a tiled window, a thumbnail or an export
made while another document is in front no longer borrows the front
document's definitions. A temporary document drawn while a document draws
keeps that document's fonts, and type laid out with nothing lent still uses
the registered ones.
- FontDb::composite_font looks only in the latest loan of the database.
- lend_composite_fonts lends an empty set at the top level when the
database holds composite fonts; lend_document_composite_fonts also lends
one inside another loan, for placed documents, back-document measuring
and threaded reflow on open.
- A loan that leaves out a registered font gets its own generation, so
layouts made with that font are not reused under it.
A path's Drop Shadow, glow, blur, Feather or pixel filter listed before a
Transform effect that makes copies was drawn once under all the copies, at
the object's own distances. Each copy now carries those raster effects,
scaled by the copy's mean scale, with a Drop Shadow's offset turned,
reflected and scaled with the copy. Raster effects listed after the
Transform effect still paint once around all the copies. Copies that stop
at the effect budget keep their effects, and a Transform effect without
copies draws as before.
The canvas, the object's bounds, export, baking and Expand Appearance use
the same art. Type, images, symbol instances, groups, a fill's or stroke's
own copying Transform effect, and paths with Rasterize or an SVG filter
before the copying effect keep one set of raster effects.
The image crate's filtered resize filters each channel on its own, which
is correct only for premultiplied pixels, and its thumbnail averages each
channel on its own too. Placed images, linked-image previews, MCP
captures and previews, metafile bitmaps, PDF downsampling and library
thumbnails passed straight RGBA to them, so the color under clear pixels
(usually black) bled into the opaque pixels beside them and darkened
cut-out edges.
vectorcraft_doc::resample scales such images with each pixel's color
weighted by its alpha: filtered resampling premultiplies the pixels in
place and divides them back after, and averaging takes the area-weighted
mean of the pixels each new one covers. Opaque and alpha-free images are
scaled as before. PDF export also multiplies the inks of a CMYK image
with alpha by that alpha before resampling them, and divides them by the
resampled alpha after.
A gradient stop linked to a spot ink that also carries process plates
(a DeviceN stop opened from a PDF) printed only its spot tint: print
separations and Separations Preview left its Cyan, Magenta, Yellow and
Black plates blank. They now print the stop's plates beside the tint.
With spots printed as process, each process plate prints the stop's
plate layered with the spot tint's process equivalent, as a separated
image's spot plates layer. Plates beside no spot link, or beside
Registration, still print nothing of their own.
The color visitor also skipped a freeform gradient's points, so print
plates kept their display colors and Document Color Mode left them
unconverted. The points are now visited as unlinked colors.