Text not centred when multiple tspan elements are used
When using the following markup in a browser (Edge, Chrome, Firefox) the text is properly centred.
SVG seems to centre on the first <tspan> and the rest of the text will be rendered too much to the right.
<svg width="250" height="40" viewBox="0 0 250 40" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100%" height="100%" style="fill: none; stroke: black; stroke-width: 0.25;" /> <text x="125" y="25" font-size="10" font-family="Verdana, Helvetica, sans-serif" text-anchor="middle"> <tspan id="patient-age">x</tspan> <tspan> year old </tspan> <tspan id="patient-gender">(gender)</tspan> </text> </svg>
I have this same problem, is there already a solution? Or some workaround?
Unfortunately, there is no solution yet. While checking this, I also found that the rectangle in the test image does is no longer drawn - probably an unrelated regression.
Still not working. Any idea? I found out, that since version 2.4.0 it stopped working
<text x="14731.0" y="-42910.0" id="text507-4-1-7-1" transform="scale(1,-1)"><tspan id="tspan505-5-0-1-2" style="font-size:1066.66662598px;font-family:Arial;text-align:center;text-anchor:middle">{#W1#}</tspan></text>
I'm having the same issue when using tspan. Is there a solution yet?