Comment 3 for bug 1701553

Revision history for this message
Alvin Penner (apenner) wrote :

yes, in retrospect, I think it would probably be best to mark this as "Will Not Fix". As far as I can tell, the source of the problem comes from rev 13750, which was committed on Nov 23, 2014:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13750

This commit introduced the new method getDocumentUnit(). This function will check the scale factor and if it happens to agree with a known value of the document units table, then it will switch the document units to this new value and will correspondingly change the value of inkex.unittouu('1px') to compensate for this change. If no match is found then px will be used as a default and apparently inkex.unittouu('1px') will revert to 1. This means that there will inevitably be discontinuities if one uses a scale factor that is close to, but not exactly the same as, a known scale factor for converting units. So we will have to live with this discontinuity, or avoid it by using Scale = 1 in the Document Properties dialog, or avoid it by using the viewbox scaling procedure that was used in the file hpgl_encoder.py, which appears to work very well. The basic problem is that Inkscape's view of scaling is not fully compatible with the SVG view of scaling, because Inkscape has a parameter called inkscape:document-units which is not present in the SVG spec, so therefore the two views will never be transparently interchangeable.