how ca i specify line height ?

Discuss SVG code, accessible via the XML Editor.
tobis

how ca i specify line height ?

Postby tobis » Mon Feb 09, 2009 9:48 pm

I have automatically with php generated svg file:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
      <svg width="269.29156" height="131.10247" version="1.1"
      xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
   <text x="5" y="5">
      <tspan x="5" dy="30" font-size="30">y text</tspan>
      <tspan x="5" dy="10" font-size="10">X text</tspan>
   </text>   
</svg>

Why X text goes undes Y text. How can i dynamically obtain line-height of a text row ?

User avatar
loonquawl
Posts: 135
Joined: Thu May 15, 2008 7:57 pm

Re: how ca i specify line height ?

Postby loonquawl » Tue Feb 10, 2009 1:55 am

Probably i misunderstood your question, but if you want the xtext and the ytext to live on the same line, you have to set the y offset for the xtext to 0

Code: Select all

<tspan x="5" dy="30" font-size="30">y text</tspan>
<tspan x="5" dy="0" font-size="10">X text</tspan>


Return to “SVG / XML Code”