W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

RE: Is the px unit equivalent to user units?

From: Jon Ferraiolo <jonf@adobe.com>
Date: Wed, 4 Jan 2006 11:30:20 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C8576190@namail3.corp.adobe.com>
To: "Bjoern Hoehrmann" <derhoermi@gmx.net>
Cc: <www-svg@w3.org>


---------
That depends on the environment, as SVG 1.1 notes these numbers are
examples for 90ppi.
---------
Yes, that is correct. I will supplement your point for clarity and preciseness that the 90ppi ratio (versus something like 100ppi) only affects the conversion factor for pt/pc/mm/cm/in units into user units. For px units, it is always the case that 1px is equivalent to 1 user unit.

---------
It's still not clear from your response when it
might matter whether you specify 'y' or 'ypx' anywhere in SVG content
(apart from DOM representations, etc). Per SVG 1.1 it should not
ever.
---------

To be more precise, some attributes and properties in SVG Full 1.1 allow <length> values and others only allow <number> values. What you say above is true for <length> values: you get the same result for <length> values in SVG Full 1.1 no matter whether you specify "5" or "5px".

---------
I hope you raised an issue about this...
---------
But of course. :-)

Jon


-----Original Message-----
From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] 
Sent: Wednesday, January 04, 2006 11:07 AM
To: Jon Ferraiolo
Cc: www-svg@w3.org
Subject: Re: Is the px unit equivalent to user units?

* Jon Ferraiolo wrote:
>In SVG Full 1.1, CSS absolute units are allowed in many other places for
>length values, but there is a simple algorithm to convert from absolute
>units to user units via a simple multiple operation. Thus, "1px" is
>equivalent to "1" (i.e., 1 user unit), "1pt" is equivalent to "1.25",
>and "1in" is equivalent to "90".

That depends on the environment, as SVG 1.1 notes these numbers are
examples for 90ppi. It's still not clear from your response when it
might matter whether you specify 'y' or 'ypx' anywhere in SVG content
(apart from DOM representations, etc). Per SVG 1.1 it should not
ever.

>(Note: I believe the Tiny 1.2 Last Call draft as it stands is confusing
>in this area. It includes the conversion rules from CSS absolute units
>to user units within section 7.11, but as far as I know there are no
>features in Tiny 1.2 that would ever invoke these conversion rules.)

I hope you raised an issue about this...
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 4 January 2006 19:28:58 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT