Re: [Bug 90166] Add a way to specify units (in SVG output)

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAL-8oAisKYmeYc8mFDadVNpZRe9rCzcgZi2D1X7Q__L3Do5KXQ@mail.gmail.com>
If I understand that right, "percent" is not allowed in the style attribute.

Also it seems like the default is "user". By default I mean what svg
does if you don't specify the unit at all. If cairo has been forcing
that value to pt then I think Cairo is wrong.


On Sat, Oct 21, 2017 at 10:10 AM, Antonio Ospite <[email protected]> wrote:
> On Tue, 17 Oct 2017 06:24:17 +1030
> Adrian Johnson <[email protected]> wrote:
>
>> On 17/10/17 06:15, Bill Spitzak wrote:
>> > I would put USER first as it appears to be the default value, making
>> > it zero is a good idea to avoid confusion.
>>
>> The default is points.
>>
>
> So, should I put PT first and have the following order?
>
> +typedef enum _cairo_svg_unit {
> +    CAIRO_SVG_UNIT_PT = 0,
> +    CAIRO_SVG_UNIT_EM,
> +    CAIRO_SVG_UNIT_EX,
> +    CAIRO_SVG_UNIT_PX,
> +    CAIRO_SVG_UNIT_IN,
> +    CAIRO_SVG_UNIT_CM,
> +    CAIRO_SVG_UNIT_MM,
> +    CAIRO_SVG_UNIT_PC,
> +    CAIRO_SVG_UNIT_PERCENT,
> +    CAIRO_SVG_UNIT_USER
> +} cairo_svg_unit_t;
>
> Or can I stick to the "official" order suggested by the specification
> [1], and just mention in the API doc that "pt" happens to be the default
> unit for *cairo*, if cairo_svg_surface_set_document_unit () is not
> called?
>
> Thanks,
>    Antonio
>
> [1]  https://www.w3.org/TR/SVG/types.html#DataTypeLength
>
> --
> Antonio Ospite
> https://ao2.it
> https://twitter.com/ao2it
>
> A: Because it messes up the order in which people normally read text.
>    See http://en.wikipedia.org/wiki/Posting_style
> Q: Why is top-posting such a bad thing?
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.