When using RTL characters in svg chrome seems to freakout. It does not respect the x
or y
positions in different ways. for x
0 does not seem to be the left of the parent. Also the y
position seems to reverse the vertical order of the tspans
.
Is this a known bug? Is there any good way to get good RTL support in chrome? I also notice the selection does not select in the correct direction for RTL.
I tested FF 42 and there are some x
positioning problems but the vertical order of tspans
is correct. Also the selection is in the correct RTL direction.
<svg width="600" height="448" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="0" y="0" style="
font-size: 64px;
fill: rgb(0, 0, 0);
text-align: left;
">
<tspan x="0" y="83.375">است، یعنی جملهای که </tspan>
<tspan x="0" y="195.375">تمامی حروف الفبای زبان </tspan>
<tspan x="0" y="307.375">انگلیسی را در خود دارد. </tspan><tspan class="glyphRow" x="0" y="419.375">از این جمله برای آزمایش</tspan>
</text>
</svg>