Re: path data attribute lacks units!

Hi, Dr. Olaf-

On 2/12/12 8:31 AM, Dr. Olaf Hoffmann wrote:
> Brian Birtles;
>> For example:
>>
>>    <svg width="3cm" height="4cm" viewBox="0 0 300 400">
>>      <rect width="100" height="50"/>
>>      <path d="M30 40.... " />
>>    </svg>
>>
>> In this example, 1 SVG user unit will be scaled to 0.1mm. The user agent
>> will try to take care of the mapping between pixels and centimetres so
>> that the result is resolution independent.
>
> In theory this is what is intended for SVG and what is correct, because
> currently all SVG versions refer to CSS2.0 to define the meaning of
> units like cm, mm or in. To use no units on other attributes or properties
> than width and height of the root svg element simplifies things a lot and
> ensures, that the relative sizes of objects are simple to predict.
>
> However, unfortunately in CSS2.1 such absolute units as well as px
> are intentionally obfuscated - and with typical user agents one will
> not get 3cm if you write 3cm - such user agents simply fail, what is
> documented with the obfuscation of units in CSS2.1.
>
> Therefore in practice one can create such documents with a defined
> size and they are ok, but with typical user agents they will be displayed
> wrong - and there is no work around for this problem.
>
> If one day the SVG decides to refer to CSS2.1 instead of CSS2.0
> concerning units, one cannot even write documents with a defined size
> anymore in new versions of SVG.
>
> My conclusion is, that practically already now SVG is not useful for
> applications, that require that the graphics is displayed in a specific
> and predictable size, this option is completely corrupted.

Uncalibrated screens, or those running at variable resolutions, are not 
expected to be absolute in terms of pixel size.

Print, on the other hand, can afford these real-world measurement units.

Thus, units in SVG are as useful as can be expected for screens, and as 
useful as is necessary for print.


Regards-
-Doug

Received on Sunday, 12 February 2012 19:02:47 UTC