Comment 48 for bug 168164

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I love having pt as units because my work is mostly for print, and it was a real pain to calculate the type size from pixels for every text object, every time.
However I found that when I add a viewBox to documents stored with current trunk with pt as units, the size of SVG text is wrong when viewed in a browser (I tried with Iceweasel, Chromium, Gnome Web and Midori), just as ~suv pointed out.
Eye of Gnome, the image viewer, is also affected by this combination of viewBox and pt units for type.
I've started to use viewBox because inkscape SVGs are always imported with the wrong size in other programs like Scribus (and Corel, and Illustrator), which assume a resolution of 72 dpi instead of 90.

Setting a viewBox for having a real world units reference seems as important as having type in real world units to me, so this solution is incompatible.
I wonder why the units have to be "hardcoded" in the document. Why not just calculating the values on the fly in the UI and keep working with pixels, but with a properly viewBox set in the document?
Other programs seem to react correctly and assign the right size when the viewBox element is set and units in SVGs are pixels.