Skip to content

rsvg-convert: fix dimensions of SVG output

The RsvgDimensionData structure uses pixels as unit for drawing dimensions (see librsvg/rsvg.h), but the default unit for SVG documents in cairo is pt; thus, when exporting to SVG with rsvg-convert, the output drawing results scaled up compared to the original one.

Since rsvg already converted input units to pixels, it's safe to assume the SVG output is always in pixels, so set the SVG surface units to pixels to keep the original dimensions.

Bump cairo dependency to 1.5.12 as cairo_svg_surface_set_document_unit() was not available before that version.

Fixes #365 (closed)

Merge request reports