SVG defaults to pixels (90dpi) despite default units

Bug #168753 reported by Bug Importer
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released
Nominated for 0.91.x by Zearin

Bug Description

Irrespective of the default units selected in document properties, inkscape
always uses pixel units (at an unchangeable 90dpi - Current CSS standard)

Inkscape should use the default units specified in the document properties,
overridden locally for each shape by the units selected in the re-sizing
toolbar (so default units can be overriden on a per-shape basis)

Failing this, there should, al least, be some way to change the default
pixel-calculation resolution.

Issue has evolved from trying to use FOP which will use absolute
measurements ie: mm, but will translate pixels to absolute at 72dpi -
current PDF standard, so everything in inkscape gets resized when included
in an FO file and translated to PDF. Would not happen if Inkscape saved
SVG with default units instead of always tranlsating to px.


Tags: svg
Revision history for this message
Ammusionist (ammusionist) wrote :

Originator: NO

Additional to this - Inkscape also converts pt to px in font-size: section
of style attributes in text elements.

I have written a console app to fix the SVG files, but I would really
prefer if Inkscape didn't convert in the first place.

Note: On re-opening an SVG with mm dimensions and re-saving, inkscape
respects the units unless the element had been changed during the session -
then it's back to "user units" (pixels) for that element.

Revision history for this message
Ammusionist (ammusionist) wrote :

Originator: NO

I've managed to work around this with a viewBox tag for the moment, but
it's not an ideal solution. Would appreciate some fedback.


Tom Davidson (tjd-mit)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Just merged in a duplicate (bug 170738, "preserve units") that dates back to 2005. That one emphasizes that if you open an existing (i.e. non-inkscape generated) SVG with other units, then inkscape converts them to px as they are touched...

Revision history for this message
khiraly (khiraly123) wrote :

Ammusionist: The Viewbox method is the correct solution for this.
Can you provide more detailed information how do you workaround using viewbox?

There were some discussions about this issue on the inkscape-dev mailing list:
Thread "Problem with real units (mm)"

And I have started a Blueprint about units:

Please add any additional information to this blueprint which eases the implementation of
this feature.

Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

This has been fixed as part of Inkscape 0.92, as detailed in bug #1389723.

Changed in inkscape:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.