'm' units identifier not handled correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
Tavmjong Bah |
Bug Description
The 'm' units identifier along with 'ft' are not part of SVG and need special handling. The special handling for 'ft' seems to work but that for 'm' can lead to an incorrect 'viewBox'.
To reproduce:
1. Open an Inkscape with the default SVG file.
2. Open the XML dialog and observe the 'viewBox' attribute.
3. Open the Document Properties dialog to the 'Page' tab.
4. Change the Units in 'Custom Page Size' to 'm'
5. Change the Units back to the original units ('mm' in the case of trunk).
The 'viewBox' values will bo 100 times bigger than they should be.
Analysis:
The file units.xml should contain all the information needed to add new units to Inkscape. However, as 'm' and 'ft' are not part of SVG special handling is required. This special handling happens in two places: units.cpp for 'ft' and document.cpp for 'm' (setWidth(), setHeight()).
The need for special handling should be eliminated. As a quick fix, the special handling for 'm' should be moved to 'units.cpp'.
Related branches
Changed in inkscape: | |
assignee: | nobody → Alvin Penner (apenner) |
milestone: | 0.92 → none |
status: | Fix Committed → Fix Released |
tags: | added: backport-proposed |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
See also comments for bug #1268355 wrt 'ft' and 'm' not part of SVG.