I have now implemented pages sizes using real world units as well as document units using a viewBox
as described in my previous post. Although it is mostly working, there are a few known bugs when changing the document unit, namely connectors and 3d boxes do not scale properly. I have also worked on fixing regressions introduced by the phase one unit refactor.
Besides document-wide units, it is also useful to have object specific units for convenience. As real world units are handled as scaling factors of the document unit by the SVG specification, they are only recommended for the document size, not individual objects, and their values are counterintuitive when a viewBox
is used to specify document-wide units. Therefore, I’ve decided to implement object specific units using an inkscape:unit
attribute instead, which will also allow for units not defined in the SVG specification, e.g. feet. The manner in which object sizes and positions are written to a SVG file will not change; the attribute will only be used to remember which unit should be displayed when an object is selected in the Inkscape UI.
Continue reading