
Hey guys!
With this thread we've hit some seriously tough discussion: Units. The SVG-spec as I understand it suggests pixels (relative units) as default unit but also allows absolute units within the SVG. Personally I strongly favour absolute units, because given that you know the resolution of your output medium you get the same results for any output medium. A 10mm x 10mm box will (at 100% zoom) be exactly 10mm x 10 mm, no matter if you print it, or see it on screen. This is quite desirable esp. in the field of DTP.
As for icons or web graphics this would make it hard to actually pixel-align elements within the SVG, since on different screens they will, while having the same absolute size, have different sizes in pixels. To some extent it is however beneficial because with the size of pixels on a computer decreasing, icons become smaller and smaller, which may cause drawbacks in terms of usability.
I believe that any SVG should either be using absolute units solely or relative units solely, but one should have the choice between those two. When absolute units are chosen, the display size in pixels is determined by the resolution (DPI) of the outputting media (printer, screen). When relative units are chosen, the image will always have the same size in terms of displaying dots, while the size in mm varies. For DTP work absolute units are definitely preferable, for work for onscreen display this is a little harder to say... but relative units _might_ be preferable (think of printing out a webpage... all graphics will become tiny, when you use relative units)
What really surprises me about this is that within http://www.w3.org/TR/REC-CSS2/syndata.html#length-units pixels are first introduced as relative units but then in graphic 2 (laserprint vs. screen) they are handles as absolute values, while the relative value is called "dots". This is consistent with what is said about units in http://www.w3.org/TR/SVG11/coords.html [1] but that kinda confuses me the same... I'd think of relative units as "device pixels" and absolute units as "Millimeters"/"real world units"
Well, just some thoughts, I wanted to share...
Take care!
David
[1] Note that at initialization, a user unit in the the initial coordinate system is equivalenced to the parent environment's notion of a px unit. Thus, in the the initial coordinate system, because the user coordinate system aligns exactly with the parent's coordinate system, and because often the parent's coordinate system aligns with the device pixel grid, "5px" might actually map to 5 devices pixels. However, if there are any coordinate system transformation due to the use of transform or viewBox attributes, because "5px" maps to 5 user units and because the coordinate system transformations have resulted in a revised user coordinate system, "5px" likely will not map to 5 device pixels. As a result, in most circumstances, "px" units will not map to the device pixel grid.