Re: Two bidi questions

From: Lars Marius Garshol (larsga@garshol.priv.no)
Date: Fri Jul 06 2001 - 08:16:58 EDT


* Bob Hallissy
|
| Can you identify what Uniscribe (not TextOutW) doesn't do properly
| in this regard? There are some pretty sophisticated DTP apps that
| utilize Uniscribe...
 
The problem is not that Uniscribe can't do what I want, but rather the
interface between the layout engine of my application and the display
system of the OS. The layout engine creates a tree of frames and
renders the text in each frame through separate TextOutW calls.

I don't know Uniscribe very well, but I would assume that it is
possible to give it an entire paragraph and tell it to run the bidi
algorithm on it. The problem is that if I were to do that it would
require a redesign of the internals of my application, and this
redesign would have to be done in such a way as to also make sense on
MacOS, BeOS, EPOC, Linux and several other platforms.

That is of course possible (and would perhaps even be reasonable if I
only had Mac and Windows to deal with), but it's a lot of work I'm not
very keen to do if I can instead solve the problem by something as
simple setting a flag that turns off bidi reordering and mirroring in
the Windows display.

Then I can do the layout, bidi and mirroring myself (which I will in
any case have to do on some platforms).

* Lars Marius Garshol
|
| 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,
 
* Bob Hallissy
|
| Uniscribe works on any version of Windows 9x/Me, NT, or 2000 with
| the exception of FE versions of Win 9x/Me, and given the latest
| version of Uniscribe (i.e., the one that ships with Office XP) you
| get proper bidi (including the Arabic, Hebrew, and Syriac blocks of
| Unicode).

I don't doubt that it does, but I don't want to distribute Uniscribe
with my application (download size is an issue), and I can't tell
users to go install it themselves, either.

Again, a flag to turn off bidi would have been enormously much simpler
than biting the bullet and using Uniscribe.

If I do my own reordering of the layout boxes, and leave reordering of
the text to Windows getting all the cases right will be very tricky. I
will have to write some logic for figuring out when to flip text and
when not to do it, depending on platform version, overrides, support
for obscure scripts, mirroring, and so on. Getting this right is bound
to be a real pain.
 
| I would suggest that no one can correctly implement scripts that are
| "yet to appear in the SMP" -- it would violate Conformance
| requirement C6 -- other than through the PUA. But Microsoft seems to
| be committed to reving Uniscribe as new scripts are
| approved. (Granted, there is a time lag between approval and an
| updated Uniscribe being available.)

I don't for a moment doubt that they will. The problem is that new
versions of my software should run correctly on systems which have
older versions of Uniscribe. (As mentioned above I don't wish to
redistribute Uniscribe with my application.)
 
* Lars Marius Garshol
|
| Another reason is that we will have to implement [bidi] ourselves
| anyway, since not all the platforms we will be running on support
| bidi. ... I would still need my own implementation for other
| platforms as well as Windows versions that do not have Uniscribe.
 
* Bob Hallissy
|
| Ah, this is the real problem. Then how can you want Windows to do
| the Arabic shaping (context glyph selection, ligatures, diacritic
| positioning, etc)? Won't you need that for the other platforms?

I don't know, to be honest. Maybe Linux systems can already do this,
and even if they cannot I think we would want to wait for support for
this rather than implement it ourselves. There are RTL scripts that
don't need this (Hebrew, and I think also Thaana), so it doesn't mean
that bidi reordering support is meaningless without shaping support.
 
| And if you are doing the shaping yourself, then you're going to be
| doing your own glyph selection, and you can write the results using
| ExtTextOutW() with the ETO_GLYPH_INDEX flag.

That's useful to know. It does sound like it is a lot more work than
doing a redesign to adjust to Uniscribe, however.

--Lars M.



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