[cairo] [Bug 90166] Add a way to specify units (in SVG output)
Bill Spitzak
spitzak at gmail.com
Mon Oct 23 17:29:16 UTC 2017
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 <ao2 at ao2.it> wrote:
> On Tue, 17 Oct 2017 06:24:17 +1030
> Adrian Johnson <ajohnson at redneon.com> 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
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list