SVGTextLayoutEngine currently doesn't know about bidi runs and processes everything in the direction of the layout object. This would be fine except SVGTextLayoutEngine calls computeGlyphOverflow which requires that the direction used is correct.
The call to compute glyph overflow doesn't re-shape the entire text run (due to caching) but it's still not ideal and will produce the wrong result in the presence of bidi runs with glyph overflow.
There are two potential solutions I can think of:
1) Change SVGTextLayoutEngine to use a bidi run iterator
2) Add a bit to SVGTextLayoutAttributes to have a bit for direction, set it in SVGTextMetricsBuilder, and create a new fragment (shouldStartNewFragment) when the direction changes in SVGTextLayoutEngine. The refactoring in https://codereview.chromium.org/1822513002 builds towards making this cleaner.
This is a real bug (though existing and low priority) and can be seen on combining-character-queries.html.
Comment 1 by f...@opera.com
, Mar 22 2016