I am doing web layouts and use pixel heights to define my line-spacing (line-height) for text. Right now in Inkscape 0.48, I see that there is only a way to define this as percentages.
Is there a method/hack to define this as pixels instead?
Line Spacing as pixels
Re: Line Spacing as pixels
Font sizes in Inkscape are defined in pixel values [1], for example:foomarks wrote:I am doing web layouts and use pixel heights to define my line-spacing (line-height) for text. Right now in Inkscape 0.48, I see that there is only a way to define this as percentages.
- default font size 40, with default line spacing 125%:
resulting line spacing = 40 px * 1.25 = 50 px
AFAIK there is no hack to use absolute values (the unit is px anyway).foomarks wrote:Is there a method/hack to define this as pixels instead?
A possibility might be to externally edit the SVG file (using a plain-text editor) and remove the attribute 'sodipodi:linespacing' of the parent <text> object and manually adjust the y values for each <tspan>.
- Note I: untested if this is kept if the text object is edited in Inkscape later on: initially at least Inkscape renders it correctly with the modified y-positions).
- Note II: the y coordinates refer to the SVG origin in the upper left corner, not to Inkscape's origin as used for the GUI (rulers, controls bar).
[1] many users demand to be able to define font sizes in points (pt), but this has not been implemented (yet)