3

When I set my font size to 100 within Inkscape, the font size saved within the SVG is not set to 100. In the attached example, the font size within the SVG is set to 133.333px. Why? It seems Inkscape and the SVG are using different scales/units of measurement for the font size. I'm doing some SVG programming, and it would be MUCH easier if I could get these two values to match. Is there a setting within Inkscape that will make these values the same?

Any help is much appreciated.

Regards,

Wyatt

question screenshot example

1

2 Answers 2

5

The text size is in pixels in the XML. However, the default text size is measured in points in Inkscape 0.92. You can set the units in Inkscape's Preferences to pixels if you want.

enter image description here

8
  • 1
    Actually, the size is labelled as px, but px in user units. So the numbers in the XML are given in mm (real-world units), if the default document is used.
    – Moini
    Commented Jul 22, 2019 at 13:31
  • See also: wiki.inkscape.org/wiki/index.php/Units_In_Inkscape
    – Moini
    Commented Jul 22, 2019 at 13:31
  • @moini - interesting, and yet utterly confusing at the same time ;) So if the text units should be set to millimetres instead, can I hire an assassin to shoot the person who was responsible for this?
    – Billy Kerr
    Commented Jul 22, 2019 at 13:39
  • This preference change solved my issue. Now all my units of measurement are the same. Thank you for your help. My default Inkscape document is measured in pixels. As shown here: dropbox.com/s/cano5iwip1w5jac/… Commented Jul 22, 2019 at 18:30
  • 1
    @Moini I can see that now. If I choose the Desktop template when creating a new document, then changing the Text Size units to pixels seems to work as expected. This is good to know about. Thanks for the extra info.
    – Billy Kerr
    Commented Jul 23, 2019 at 15:58
3

To have the same units displayed in the XML as in the font size dropdown in Inkscape 0.92.4, set the Text units to 'mm' (if you're using the default document template, not a custom one). See screenshot in Billy Kerr's post for where to find it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.