[cairo-bugs] [Bug 90166] Add a way to specify units

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 11 17:37:19 UTC 2017


--- Comment #5 from Antonio Ospite <ao2 at ao2.it> ---
Created attachment 134799
  --> https://bugs.freedesktop.org/attachment.cgi?id=134799&action=edit
svg: add a new function to specify the SVG document units


the attached patch shows what I have in mind, it adds a
cairo_svg_surface_set_document_unit() function to allow users to
set a unit for the width and height values of the root <svg> element.

In particular my use case is to draw on the surface thinking in pixels and
still have the expected result when generating SVG output. Currently this is
not possible because cairo hadcodes the unit as "pt" in the generated SVG file.

I noticed that rsvg behaves quite sanely with any of the units while Inkscape
doesn't seem to like the relative ones (em, ex, %).

Finally, since the change only affects the header of the generated output file
I have the feeling that there is no need to deal with dpi in cairo: editors and
rasterizers will do that if appropriate.


You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20171011/31803a83/attachment.html>

More information about the cairo-bugs mailing list