[FriBidi] bidi mirror

Eli Zaretskii eliz at gnu.org
Tue Mar 28 17:24:45 UTC 2017


> From: Eduardo CastiƱeyra <eduardo at brainstorm3d.com>
> Date: Tue, 28 Mar 2017 19:05:14 +0200
> 
> I'm using the fribidi_shape_mirroring function in order to fix the 
> direction of the parenthesis.
> 
> But it seems not to work properly in levels deeper than 0 or 1.
> 
> I think the problem is similar to the one I'm experiencing in the bidi tool
> 
> Consider this level 0 text:
> 
> http://unicode.org/cldr/utility/bidi.jsp?a=sample+%28text%29&p=LTR
> 
> Then, we change the Paragraph direction in the drop down from LTR to RTL
> 
> http://unicode.org/cldr/utility/bidi.jsp?a=sample+%28text%29&p=RTL
> 
> Suddenly, all the L0 become L2 except the last parenthesis and thus, the 
> reordered view shows the parenthesis at the beginning.

That page says "Not yet updated for the changes in Unicode 6.3!",
which means the Bidirectional Parentheses Algorithm (BPA) is not
accounted for.  The BPA causes the text to be rendered reasonably,
with parentheses mirrored as expected.  E.g., try that in a recent
enough Emacs.

> Should the user be forced to enter a RLM mark to solve this issue?

No need, not under Unicode 6.3 and later.


More information about the fribidi mailing list