Reputation: 317
I created a SVG file using InkScape 1.0.1. My SVG contains one text element. In InkScape, I have the "Text and Font" dialogue open.
I select my text element, the Text and Font dialogue then shows the font size as 38.1. I double-click on my text (as if I was to edit the text), the Text and Font dialogue now shows the font size as 36, which is the value I choose when I created that text element.
When I open the SVG file in Notepad it contains the following:
...
<text xml:space="preserve" style="font-size:50.8px; ... <tspan style="font-size:48px; ... </tspan></text>
...
(I've replaced irrelevant code with "...")
So, what is my font-size really -- is it 38.1(px?), 36(px?), 50.8px or 48px, and why are there more than one value?
Notes:
I've assumed that the Text and Font dialogue displays the font size in pixels, but no unit is actually displayed in that dialogue.
I notice that the ratio 50.8/48 is the same as the ratio 38.1/36. I also noticed that the ratio 48/36 is 4/3.
The width and height of my viewBox
is the same as the width and height of the SVG view port (as specified in the SVG root element).
I have no nested SVG elements.
Thanks!
Upvotes: 1
Views: 197
Reputation: 1397
The Text+Font editor uses pt as a unit (see tooltip).
There is an outer style and an inner style on your text, and they differ, for whatever reason. The inner style is what counts for the selected part of the text.
Upvotes: 1