SVG: tspan tag inside rtl text reverses the ordering of words
Hi there,
In the code below:
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:lang="fa" direction="rtl">
<g font-family="Dana-FaNum" font-size="16">
<text x="50%" y="300" text-anchor="middle"><tspan font-weight="bold">نام: </tspan><tspan>مهدی</tspan></text>
</g>
</svg>
The SVG output is:
and the PNG output:
Looks like when I add the tspan tag to make part of text bold, librsvg reverses the ordering of words, assuming the text is in ltr mode. Adding direction="rtl" to the parent text tag also doesn't solve the problem.
If I omit the tspan tags and just write:
<text x="50%" y="300" text-anchor="middle">نام: مهدی</text>
Both outputs seem to be correct:
What do I do to solve the issue? Please, help me!