* Lars Marius Garshol
|
| 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.
* Bob Hallissy
|
| 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.
This matches the results of my limited experiments.
* Lars Marius Garshol
|
| 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.
* Bob Hallissy
|
| Actually, it does a pretty good job. I think the one thing TextOutW
| would be missing is any override of the paragraph direction.
Yep, but that is something I must get right, because many documents
will use visual ordering instead of logical ordering.
* Lars Marius Garshol
|
| Does anyone know how to turn this reordering behaviour off?
* Bob Hallissy
|
| One way works: output the characters one at a time :-(
Not possible for many reasons, performance reasons among them.
| 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?
I want Windows to do it. It does a fine job of it, and so there is no
need for my code to involve itself in that part of the rendering.
| If you want Windows to do it, why not let it handle the bidi as
| well?
Because it doesn't have all the information it needs to do the job
properly, and because not all Windows versions will do this at all.
Further, I suspect that not all Windows versions will run bidi
reordering on, say, Syraic, or RTL scrips yet to appear in the SMP.
Another reason is that we will have to implement this ourselves
anyway, since not all the platforms we will be running on support
bidi.
| Have you considered using the Uniscribe APIs for text layout?
I have, but so far I have not found any problem that they are likely
to solve for me. They probably would do bidi, but then I would still
need my own implementation for other platforms as well as Windows
versions that do not have Uniscribe.
| 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.
This is what the CSS and HTML specifications say that it should, but
the question is whether this is optimal behaviour or not. Can page
authors be trusted to insert dir=rtl attributes, or should browsers
apply P2 and P3 if neither rtl nor ltr is specified?
Having thought about it a bit more I guess it makes sense to simply
match what IE does, since page authors most likely have tested their
pages with it.
My initial interpretation of that sentence was that it was
predominantly Arabic, but on second thought that may be wrong.
(Developing an intuition for bidi is hard, it seems. :)
--Lars M.
This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 13:48:07 EDT