mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 14:06:09 +00:00
* SVG export: preserve document unit in viewBox and width/height (#864) When exporting SVG documents with physical units (mm, cm, in, pc), emit the physical unit suffix on the root <svg width=... height=...> attributes while keeping viewBox numbers and inner coordinates in 1:1 points per SVG 1.1 coords §7.10. This avoids the 75% scaling mismatch when opening drawings in external tools such as Inkscape or LightBurn, and preserves the document unit setting across save/open round trips. Unitless documents (points, pixels) continue to emit unitless dimensions. Tested via export_physical_units_writes_unit_suffixes in vectorcraft-svg and full round-trip svg_round_trip_preserves_document_units in vectorcraft-engine. Ran cargo xtask ci (fmt, clippy, tests, xtask gates). * SVG export: preserve nonzero width and viewBox on extreme small dimensions