photocraft/crates/io
Ahmed Magdy 4e5c6a018a
fix(io): SVG text placed by a transform keeps it on import (#4806) (#5334)
usvg builds the glyph outlines of a text element (Text::flattened) with
identity absolute transforms, and the SVG importer read each path's
abs_transform(). Text positioned by its own or an ancestor's transform,
as Illustrator writes every text element (matrix(1 0 0 1 x y)), lost it:
it landed off the canvas, so nothing showed, or at its untransformed
place and size.

The converter now composes each node's transform from its parent chain,
which equals abs_transform() outside text, and sizes raster fallbacks
from the same transform. A new test checks translate, matrix, scale and
transformed groups against resvg's own render; it fails on main.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:19:47 -06:00
..
examples raw: fit non-DNG colour to the camera's embedded JPEG (#2135) 2026-10-11 05:45:46 -04:00
src fix(io): SVG text placed by a transform keeps it on import (#4806) (#5334) 2026-10-16 19:19:47 -06:00
tests fix(io): SVG text placed by a transform keeps it on import (#4806) (#5334) 2026-10-16 19:19:47 -06:00
Cargo.toml Add OpenRaster (.ora) import and export (#2257) 2026-10-10 08:40:35 -04:00