[cairo] SVG output without "pt" in the coordinates - how?

Carl Worth cworth at cworth.org
Fri Oct 24 15:55:19 PDT 2008


On Fri, 2008-10-24 at 15:28 +0200, Emmanuel Pacaud wrote:
> >From the SVG specification:
> 
> "the em and ex unit identifiers are relative to the current font's
> font-size and x-height, respectively."
> 
> "The other absolute unit identifiers from CSS (i.e., pt, pc, cm, mm, in)
> are all defined as an appropriate multiple of one px unit

This language has always suggested to me that cairo should be emitting
SVG output without any absolute unit identifiers, (so that everything is
in px). I guess I hadn't realized that that's not what cairo has been
doing.

Additionally, as I understand the specification there are things like
<path d="..."/> in SVG where there's no option to do any absolute units
*anyway* and only px is possible.

So that's always seemed to me like SVG really doesn't have any means of
doing absolute units throughout, and the best one can do is to add a
top-level wrapper, (perhaps viewbox or an enclosing file, or whatever),
to set some absolute-unit scale.

If cairo is going to be involved in that absolute-scale-setting wrapper,
I think we should require the user to opt-in to it somehow.

-Carl (who is really quite uninformed on the matter, so please take my
opinions as those of just another user---not gospel)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20081024/6f26920d/attachment.pgp 


More information about the cairo mailing list