Re: Two bidi questions

From: Bob_Hallissy@sil.org
Date: Thu Jul 05 2001 - 11:19:06 EDT


>My main problem right now is that when I have all the
>text reordered and laid out, and start passing text blocks to the
>Windows TextOut API method Windows 2000 goes "Oh, this is Arabic! It
>should be the other way.", and promptly undoes all my reordering.
>
>Not all Windows versions do this, of course, and I suspect that those
>that do do not entirely agree on which scripts should be treated in
>this way.

This will happen on Windows 2000 because TextOutW() and similar APIs are
routed through Uniscribe.
It will happen on Arabic-localized editions of other versions of Windows
because that is what is expected.
It will not happen on, for example, English versions of Win 9x.

>Nor does Windows have all the contextual information my
>application maintains about the text, so there is no way Windows can
>get the display right in all situations.

Actually, it does a pretty good job. I think the one thing TextOutW would
be missing is any override of the paragraph direction.

>Does anyone know how to turn this reordering behaviour off?

One way works: output the characters one at a time :-( But this also
inhibits arabic shaping (i.e., selecting the correct contextual form) --
are you doing that yourself or do you want Windows to do it? If you want
Windows to do it, why not let it handle the bidi as well? Have you
considered using the Uniscribe APIs for text layout?

>The second question should be really easy. On
>
> <URL: http://www.unicode.org/unicode/standard/WhatIsUnicode.html >
>
>on the upper left, there is some text saying (in logical order):
>
> WHAT IS "UNICODE"? in arabic
>
>As I understand the bidi algorithm, this should be rendered
>
> in arabic ?"EDOCINU" SI TAHW
>

In the bidi algorithm, note the paragraph after P3, TUS 3.0 pg 61: "Note
that when a higher-level protocol specifies the paragraph level, it is not
necessary to apply rules P2 and P3". Obviously, IE is using a higher level
protocol to indicate the paragraph direction is LTR, not RTL as the first
strong character would dictate by P3.

Bob



This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 13:48:07 EDT