Commit Graph
594 Commits
Author SHA1 Message Date
dotCooCoo 41647e3754 PSD: mark the type data's Cookie key as a file format name
The Cookie dictionary in a type layer's text engine data uses a key that
the format defines and that names a vendor product. The line now carries
a brand-ok comment, so cargo xtask brands passes.
2026-11-15 16:02:09 -08:00
dotCooCoo 53e0c3c921 PSD: type in a language other than English: USA or set with a Standard composer stays pixels
A type layer records neither the language nor the composer, so point type
whose runs name another language, or whose paragraphs use a Standard
composer, is written as pixels. New type's default paragraph settings
(the every-line composer, Burasagari and Mojikumi) no longer keep it from
becoming a type layer; Mojikumi other than the default still does in type
with Chinese, Japanese or Korean characters.
2026-11-15 13:45:00 -08:00
dotCooCoo 78058a3521 PSD: type layers keep the type's anti-aliasing, and fallback-font type stays pixels
A type layer now records the type's own anti-aliasing method (None,
Sharp, Crisp or Strong; None when the export draws without
anti-aliasing) instead of Smooth. Type with a character that its font
lacks, and so is drawn with a fallback font, stays pixels; breaks,
joiners and variation selectors do not count. Hidden type that the export
leaves out (Include Hidden Layers off) no longer splits its layer, and a
fill or stroke that blends in a mode other than Normal keeps the layer
whole like an object that does.

The reader test uses craft-psd, which replaced the psd crate on main.
2026-11-15 12:50:09 -08:00
dotCooCoo a91c0a6ab1 Merge main into feat/psd-preserve-text-editability 2026-11-15 12:07:15 -08:00
dotCooCoo 4327c51f57 PSD: Preserve Text Editability writes point type as editable type layers
The PSD Options dialog gets Preserve Text Editability, and document.export
takes preserveText (with layers). Horizontal and vertical point type is
written as a type layer (a TySh block with its EngineData) that a reader
can edit, and keeps its pixels. The layer holds the text, its fonts by
PostScript name, size, leading, tracking, scaling, baseline shift, caps,
underline, strikethrough, fill color, Fractional Widths, paragraph
alignment and orientation.

Type that a type layer would draw differently stays pixels: area type,
type on a path, strokes, non-solid fills, fractional tracking, character
attributes the layer does not carry, paragraphs that set more than their
alignment or run right to left, System Layout, Optical Margin Alignment,
ruby, effects, an appearance of its own and opacity masks. A layer that
holds type becomes a group of its type layers and pixel layers of the art
between them, unless other art in it blends in a mode other than Normal.
2026-11-15 12:07:06 -08:00
FredApps 33b5706c7a Merge pull request #7664 from storytold/fix/restore-codec-cutover-ci
Restore shared codec cutover with CI compatibility fixes
2026-11-15 21:05:52 +01:00
Dylan M. Taylor 2ad5fa1734 Preserve renderer source limits for streaming PNG reduction 2026-11-15 17:41:07 +00:00
FredApps c9cad8d017 Merge main into fix/restore-codec-cutover-ci
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.
2026-11-15 15:43:44 +01:00
dotCooCoo 57320b53a0 Merge main into fix/directional-pixel-effects-before-a-rotating-or 2026-11-15 06:14:09 -08:00
BFlat 8138a6e973 Merge pull request #7814 from dotCooCoo/feat/editing-one-anchor-copies-the-whole-anchor-list
Paths: editing one anchor of a long path keeps one chunk of anchors for undo
2026-11-15 17:31:01 +07:00
BFlat 63f5dcea9b Merge pull request #7800 from dotCooCoo/fix/a-rasterize-effect-before-a-scaling-transform
Effects: a Transform effect after Rasterize moves the image with its pixel grid
2026-11-15 16:40:20 +07:00
dotCooCoo 18fe65acd6 Type: composite fonts take custom character sets
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.
2026-11-14 22:16:08 -08:00
dotCooCoo 7104cd05f3 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-14 22:05:53 -08:00
dotCooCoo ac9560ed26 Merge main into fix/directional-pixel-effects-before-a-rotating-or 2026-11-14 21:34:17 -08:00
dotCooCoo 9afd71bcb6 Merge main into fix/a-rasterize-effect-before-a-scaling-transform 2026-11-14 21:25:33 -08:00
dotCooCoo a5493a1cd0 Paths: editing one anchor of a long path keeps one chunk of anchors for undo
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.
2026-11-14 21:25:15 -08:00
dotCooCoo 27553366ab Effects: a Transform effect after Rasterize moves the image with its pixel grid
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.
2026-11-14 20:45:07 -08:00
BFlat 26878d3d0e Merge pull request #7715 from dotCooCoo/fix/svg-open-path-type-before-start
Type on a path: type on an open path can start before the path
2026-11-15 10:46:42 +07:00
dotCooCoo f35e9d091d Effects: pixel filter directions turn and reflect with a Transform effect after them
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.
2026-11-14 18:27:30 -08:00
Dylan M. Taylor 28c8b12452 test(render): correct PNG row scratch thresholds 2026-11-15 01:42:22 +00:00
BFlat 2331fd44fa Merge pull request #7680 from dotCooCoo/feat/radial-blur-center
Effects: Radial Blur turns about a Blur Center set in its dialog
2026-11-15 08:24:28 +07:00
Dylan M. Taylor fb45e7ecb5 fix(render): validate dimensions in PNG header estimate 2026-11-15 00:37:40 +00:00
Dylan M. Taylor 118a9b627f fix(render): use integer divisibility helper 2026-11-15 00:35:33 +00:00
Dylan M. Taylor eb9c049af0 fix(render): estimate streaming for truncated PNG headers 2026-11-15 00:29:35 +00:00
dotCooCoo 094971e3ac Type on a path: type on an open path can start before the path
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.
2026-11-14 15:44:12 -08:00
Dylan M. Taylor 5122a1f9d9 fix: preserve XML and raster import semantics after codec cutover 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 1e1100a9ed fix(tiff): keep test directory alive while checking borrowed ICC bytes 2026-11-14 23:25:19 +00:00
Dylan M. Taylor db05483915 fix(codecs): adapt migrated regression tests to shared public APIs 2026-11-14 23:25:19 +00:00
Dylan M. Taylor d97cb31bb6 fix(render): use CodecError::Unsupported and cargo fmt 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 00804c9ed3 fix(render): fix PNG streaming decode error type and u64 casts 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 08305948cf style: cargo fmt 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 1306afb5e8 Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638) 2026-11-14 23:25:19 +00:00
BFlat 4fffbce639 Merge pull request #7614 from dotCooCoo/fix/export-cull-brushed-path-art
PDF, EPS and print: a brushed path just off the page whose brush paints onto it is written
2026-11-15 06:17:15 +07:00
dotCooCoo a5868102ae Merge main into feat/radial-blur-center 2026-11-14 13:47:19 -08:00
dotCooCoo 5831b1d23a Effects: Radial Blur turns about a Blur Center set in its dialog
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.
2026-11-14 13:39:57 -08:00
BFlat 88b83a8689 Merge pull request #7546 from dotCooCoo/fix/svg-raster-keeps-resolution
SVG import: a raster stored again as PNG keeps its resolution
2026-11-15 04:22:10 +07:00
dotCooCoo 4ee24a8bbe Merge main into fix/export-cull-brushed-path-art 2026-11-14 12:29:41 -08:00
BFlat 6970c4efec Merge pull request #7609 from dotCooCoo/fix/transform-copies-raster-effects
Effects: each copy of a Transform effect draws the raster effects listed before it
2026-11-15 03:21:43 +07:00
dotCooCoo df257c2d53 Merge main into fix/svg-raster-keeps-resolution 2026-11-14 12:12:06 -08:00
bflatastic 79572cbf6c Revert "Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638)"
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.
2026-11-15 02:26:07 +07:00
Dylan M. Taylor bada8e1710 Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638) 2026-11-14 13:49:50 -05:00
dotCooCoo c51d14262f Merge main into fix/composite-font-lent-document-only 2026-11-14 09:42:51 -08:00
BFlat 63129de08a Merge pull request #7595 from dotCooCoo/fix/image-scaling-alpha
Images: scaled-down images keep their color beside clear pixels
2026-11-15 00:41:27 +07:00
dotCooCoo 46c9f922c2 Type: a document draws only its own composite font definitions
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.
2026-11-14 08:16:02 -08:00
dotCooCoo a40f00ece9 Merge main into fix/export-cull-brushed-path-art 2026-11-14 07:25:25 -08:00
dotCooCoo c410e3fbb5 Brushes: the renderer's brush cull room counts only painted brushed strokes
The doc comment on pad() now says a brushed stroke needs a paint to get room, as vectorcraft_brush::reach does.
2026-11-14 07:25:25 -08:00
dotCooCoo 96a8a0c6d6 Merge main into fix/svg-raster-keeps-resolution 2026-11-14 07:23:45 -08:00
BFlat 508a0b0180 Merge pull request #7597 from dotCooCoo/fix/separations-spot-stop-plates
Print: a spot gradient stop prints its process plates on the separations
2026-11-14 21:51:47 +07:00
BFlat 09f882b9d2 Merge pull request #7534 from dotCooCoo/fix/tiled-documents-own-profiles
Color management: documents behind the front one draw through their own profiles
2026-11-14 21:51:30 +07:00
dotCooCoo e086cf6d83 PDF, EPS and print: brush art painting onto the page keeps its path 2026-11-14 05:51:22 -08:00