[FriBidi] bidi mirror

Eduardo CastiƱeyra eduardo at brainstorm3d.com
Wed Mar 29 10:13:59 UTC 2017



On 3/28/2017 7:24 PM, Eli Zaretskii wrote:
>> 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.
>
I think I didn't ask the correct question. The problem is not the 
parenthesis not flipping but the fact that the last parenthesis level is 
odd, which causes:

1) The parenthesis being shown at the beginning of the sentence.
2) fribidi_shape_mirroring flipping the parenthesis when it shouldn't

So, in this regard I actually cannot complain about the behavior of 
fribidi_shape_mirroring, in any case I should complain about 
fribidi_log2vis but I don't think it is doing anything different that 
what the BiDi algorithm says. I just would like to know how to prevent 
this case.

I have compared MS Notepad in Windows 10 and Windows 7 (pre-U6.3) and 
you're right, Windows 7 puts the parenthesis at the beginning and 
Windows 10 puts it at the end which is consistent with the Unicode 6.3 
explanation but...

What about Fribidi? Doesn't it implement U6.3 ? Why am I seeing the 
parenthesis also at the beginning in my application ?

Thanks!






More information about the fribidi mailing list