
On Fri, 2014-04-11 at 23:17 +1000, Nathan Hurst wrote:
Hi Tav, Cam, Did they give a reason: was it difficulty in implementation, lack of demand, existing solution is sufficiently expressive? I wrote an idea to this list a while back about how to implement different independent units properly using vector units.
njh
Here is the response from Cameron (an SVG Working Group member):
<quote> I don't remember this being discussed; maybe it was a dinner conversation I was out of earshot of.
I don't think we should have an interpretation of CSS length units within a document that is different from CSS as used in HTML documents. and Web compatibility basically dictates that in, mm, etc. need to be interpreted as a fixed multiple of CSS px. I think the ability to set the ratio between initial user units and inches is exactly what width/height/viewBox allows you to do, if you interpret the width/height values as physical units when you go to print. That approach, and not using units other than px or user units within the document, is what I usually tell people when they ask how to write an SVG document with real-world dimensions. </quote>
On Fri, Apr 11, 2014 at 01:39:28PM +0200, Tavmjong Bah wrote:
Hi,
I had a discussion with several people at the SVG Working group meeting in Leipzig this past week about user units vs. "real" units. I proposed that it be possible to set a ratio for the initial user unit to inch (or cm). This was not well received. My basic conclusion from these discussions is that the use of any real unit (inch, pt, etc.) inside an SVG file (other than on the root 'width' and 'height') is pointless. The correct way to proceed is to set the 'width' and 'height' of the SVG to the size of the drawing and then the 'viewBox' to the same values without units, e.g.:
<svg width="20in" height="15in" viewBox( 0 0 20 15 ) ... >
Once you have done this, one user unit is one inch. If you actually set a length to an inch inside the file (i.e. width="1in"), it will be interpreted as 90 inches since we use 90 user units per inch.
OK, so be it. The gods have spoken.
However, we should at some point change 90 user units per inch to the CSS 2.1 value of 96 which has now been fixed in stone. (Illustrator has the same problem, having used a value of 84.)
Tav