Commit Graph
15 Commits
Author SHA1 Message Date
Dylan M. Taylor d594b6763b fix(svg): use normalized data URL error accounting 2026-11-15 04:32:18 -05:00
Dylan M. Taylor 586041bb68 fix(svg): preserve omission accounting on malformed data 2026-11-15 04:30:16 -05:00
Dylan M. Taylor 4e9b3e9fdd fix(svg): account for invalid embedded image data 2026-11-15 04:11:43 -05:00
Dylan M. Taylor 465fa74789 fix(metadata,raw,svg): address CodeRabbit review findings 2026-11-14 21:31:04 +00:00
Terra854 58ef208c13 fix: preserve RAW identity and SVG byte-limit reporting 2026-11-15 03:49:35 +08:00
Terra854 d61afc4a3b fix: preserve bundle commits and expose SVG resource refusals 2026-11-14 17:53:32 +08:00
Dylan M. Taylor 365bf47db6 Expose bounded SVG root dimensions 2026-11-13 06:08:48 -05:00
Dylan M. Taylor dec78a5c40 Split SVG source and expanded-tree depth limits 2026-11-13 06:01:21 -05:00
Dylan M. Taylor 75d2aeaf17 Expose neutral SVG vector document 2026-11-13 05:41:23 -05:00
Dylan M. Taylor 40304f4295 Report unsupported embedded raster images 2026-11-13 05:24:44 -05:00
Dylan M. Taylor 64f0cd410d Share XML depth across embedded SVGs 2026-11-13 04:31:22 -05:00
Dylan M. Taylor 23e633895d Track bounded SVG image resolver usage 2026-11-13 04:31:22 -05:00
Dylan M. Taylor 00d82f5bc7 Add bounded SVG tree rendering facade 2026-11-13 04:31:22 -05:00
Dylan M. Taylor 3afade5163 Expose renderer-neutral SVG preflight 2026-11-13 00:13:31 -05:00
Dylan M. Taylor 43f65a9210 craft-svg: usvg behind a bounded tree feature; attribute guard; Inkscape layer names (#937)
* craft-svg paths: a shape carries the name of its Inkscape layer

Shape::layer is the inkscape:label (else the id) of the innermost
<g inkscape:groupmode="layer"> around the element, so a CAD or cutter
import can keep the drawing's layers.

* craft-svg guard: bound attributes per element and over the document; find entities holding markup

too_wide is the attribute check of storytold/figcraft#2251: an XML
reader checks each attribute against the earlier ones on its element,
so an element with millions of them is quadratic work before any other
limit applies. entity_holds_markup lets a caller refuse a document type
whose entities become elements, as PhotoCraft does.

* craft-svg: feature `tree`, usvg behind one bounded entry point

usvg 0.48.1 (Apache-2.0 OR MIT), re-exported as craft_svg::tree::usvg,
so every app parses with one version and one set of checks:
tree::parse runs svgz, the entity, attribute and nesting guards, the
reference-chain height (VectorCraft's depth::height, on this crate's
cascade), then usvg. tree::image_resolver bounds embedded SVGs
(FigCraft's budget::resolver). tree::draw bounds what drawing a tree
with resvg allocates (PhotoCraft's svg/limits.rs).

Part of #778 and #789.
2026-11-11 18:46:38 -05:00