mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 20:31:02 +01:00
SVG export: feet, yards, meters, Q and Ha documents keep their printed size
Since #8610, a document in millimeters, centimeters, inches or picas is exported with that unit on the root width and height. A document in feet, feet and inches, yards, meters, Q or Ha still got unitless point values, which SVG readers take as CSS pixels at 96 per inch, so the art opened at 75% of its size. These units have no SVG unit identifier, so the export now writes feet and yards in inches, meters in centimeters, and Q and Ha in millimeters. The viewBox stays in points, and VectorCraft reads the file back at the same size.
This commit is contained in:
1 parent
2a5dbc479f
commit
2ffccc3e90
4 files changed
+41
-4
No files matched your search
+1
-1
@@ -442,7 +442,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi
|
||||
such stubs into one vertex (within 4× the sweep's tolerance up and down its frame and 1/16 of the 0.01 pt precision
|
||||
along it, bounded by each cluster's extent so a run of tiny level segments keeps its length); regression tests
|
||||
in `crates/pathops/src/planar.rs`. Estimate unchanged.
|
||||
- **Done (#864):** SVG export writes physical unit suffixes on the root `<svg width="..." height="...">` for documents with physical units (`mm`, `cm`, `in`, `pc`), so external vector tools (Inkscape, LightBurn) and browsers render drawings at their intended physical scale rather than scaling to 75% under point-based user-unit assumptions; unitless user coordinates in `viewBox` and path geometry remain in 1:1 internal points per SVG 1.1 coords §7.10, preserving document units on round trips (`export_physical_units_writes_unit_suffixes`, `svg_round_trip_preserves_document_units`). General document unit preferences across restarts remain tracked under #864.
|
||||
- **Done (#864):** SVG export writes physical unit suffixes on the root `<svg width="..." height="...">` for documents with physical units (`mm`, `cm`, `in`, `pc`; documents in feet and yards are written in `in`, in meters in `cm`, and in Q or Ha in `mm`, since SVG has no unit for them: `every_physical_document_unit_exports_its_printed_size`), so external vector tools (Inkscape, LightBurn) and browsers render drawings at their intended physical scale rather than scaling to 75% under point-based user-unit assumptions; unitless user coordinates in `viewBox` and path geometry remain in 1:1 internal points per SVG 1.1 coords §7.10, preserving document units on round trips (`export_physical_units_writes_unit_suffixes`, `svg_round_trip_preserves_document_units`). General document unit preferences across restarts remain tracked under #864.
|
||||
- **Missing:** general document unit preference on restart (#864; SVG export physical units done). Shape Builder regions (#937, closed), PDF text placement
|
||||
(#722, above), the bezier drag preview (#834, #3065, #3729) and deleting an interior anchor of an open path (above)
|
||||
are done.
|
||||
|
||||
Reference in new issue
Block a user