dy and dx is not handled correctly for text and tspan
We have discovered that when trying to do multiline text in SVG the dy and dx attributes are not treaded correctly. Sample svg:
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xml:lang="en" viewBox="0 0 178 178" version="1.1">
<style type="text/css">
svg {
font-family: Times;
font-size: 44px;
}
</style>
<text x="0" y="0">
<tspan x="0" dy="1.2em">Tata</tspan>
<tspan x="0" dy="1.2em">Toto tu</tspan>
<tspan x="0" dy="1.2em">ppo</tspan>
</text>
</svg>
Expected output:
Acutal output:
If I change the dy's of the svg to
<text x="0" y="0">
<tspan x="0" dy="1.2em">Tata</tspan>
<tspan x="0" dy="2.4em">Toto tu</tspan>
<tspan x="0" dy="3.6em">ppo</tspan>
</text>
It produces the "correct" output.
Using the rsvg-convert command line tool, librsvg version 2.44.10 works but version 2.45.5 does not. The latest librsvg master branch (version 2.45.91) also fails.
Edited by Ghost User