
Am 19.02.2016 um 15:49 schrieb Tavmjong Bah:
First, fixed units (pt, cm, in, etc.) should not be used inside an SVG file. This is the recommendation of both the SVG and CSS working groups. Fixed units were intended to allow one to specify a length on an output device so that 1in would result in a real length of 1 inch on any monitor. This never worked in practice as monitors rarely reported their true scaling factor. Eventually the CSS working group decided to define fixed lengths in terms of the px unit: thus we have 1in defined to be equal to 96px. In SVG this is translated as 1in = 96 user units since the initial value of a user unit is 1px. Now imagine that you have an SVG with a width of 10in, a height of 10in, and a view box of 0,0,10,10. This sets one user unit to be equal to one "real world" inch. If you specify a font size of 12pt inside the SVG file, it results in a "real world" font size of 16 inches (12pt = 16px but 1px, i.e. user unit is one inch in real world terms).
I'm not sure if this recommendation is ideal?
While for pixel-based devices I totally understand the argumentation, SVG is not limited to them. For example I'm often preparing scientific figures with Inkscape for usage in printed media. This means that I set a fixed width/height of the document (in inch or cm) and want a fixed font size (usually specified in pt). Most publishers explicitly state the size of fonts that have to be used (in pt).
I guess in this case it would be preferable to have this exact value (e.g. 8 pt) specified in the SVG file instead of some "arbitrary" pixel value that is even dependent on the specification of the view box and might also round to some absurd decimal number (that in turn might round to an even more absurd pt value).
Correct me if I'm wrong, but I don't see how a pixel specification could be recommended in this case...
Best Regards, Eduard