[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BIDI and PLS



On Wed, Oct 23, 2002 at 03:08:15PM +0200, Matitiahu Allouche wrote:
> 

NOTE: I am Cc'ing several people here who have asked to be Cc'd (plus Roozbeh
      and Behdad who should be interested in this discussion). Please do
      Cc' the 'developer' list on arabeyes.org at a bare minimum in any reply,
      as most people on that list would be extremely interested in any
      discussion on this subject.


A little background info. After the announcement of the iterm release, I have
noticed that there are two options of compiling one of the libraries (fribidi
or pls). 

The PLS (Portable Layout Services) is an API that essentially can serve as a
wrapper to an existing engine (e.g. fribidi/icu/etc). The documentation can be
found here: http://www.opengroup.org/publications/catalog/c616.htm

We've had a long thread on the subject of FriBiDi and shaping/joining which
can be found starts here:
http://www.arabeyes.org/archives/developer/2002/August/msg00072.html


> I beg to differ.  After reordering, the sequence will be  <ZWJ, Heh>, but 
> the shaping algorithm will be aware that it is processing a *visual* 
> string, so it must process the buffer from high address to low address (as 
> I indicated in my previous note), so that the result will effectively be 
> an initial Heh.

Excuse my ignorance, but I'm not sure I understand what that means. How is the
algorithm supposed to be aware of what it's processing. Doesn't the algorithm
assume that it's processing a logical string (ie. the whole purpose of the
bidi algo is to do just that logical->visual -- especially since vice versa is
not quite possible). Please elaborate if possible.


> This example has nothing special.  It is just a case of reordering and 
> shaping, and I told you that we (at IBM) routinely do reordering before 
> shaping with good results.  I would not call "good results" getting a 
> final letter instead of an initial one.  If you have more challenging 
> examples, please describe them.
> 

I see. I was merely paraphrasing an example given by Roozbeh (one of the
maintainers of FriBiDi), which is the post I pointed to from the arabeyes.org
archives in my first post on the subject. Frankly, I cannot think of another
example where this may cause a problem -- but perhaps Roozbeh or Behdad have
experienced other instances.

> I have no idea, but this does not matter.  This is just a descriptive 
> chapter, and it has no bearing on the implementation.  Believe me, I know 
> who edited that chapter, and I know some implementors, and they are not 
> the same persons.


Noted. I just didn't know if the document had a different defintion of what a
diacritic mark is, or whether it is simply wrong (in which case it would make
sense to correct -- even if it's an old document).

> You are mistaken: the PLS development took place independently from 
> Unicode development, although some individuals contributed to both.  I 
> think that PLS was published before UAX#9, so it could not have it in 
> mind.  Anyway, this is mostly material for historians.
> PLS only aimed at defining an API to which it would be possible to plug in 
> various implementation engines.  UAX#9 is just the general specs for one 
> such engine.


Makes sense. But then in the 'iterm' documentation it says to configure it
with 'pls' if you want proper shaping and with 'fribidi' if you simply want
that (and gives a brief warning on how fribidi is oblicious to shaping). That
confused me as I tried to figure out what it is that this 'pls' offered. I
haven't looked at the code, but I'm assuming that this is simply a wrapper
using fribidi at its core.

> specific APIs if you want to use the PLS API.  I have no practical 
> experience with Fribidi, but writing PLS-like wrappers around ICU APIs is 
> doable and has been done.
> 

I see. I guess what I would like to eventually determine is what FriBiDi is
missing in order for it to be able to do shaping without erroneous results
(such as the initial 'Heh' example, sighted above).


Thank you.
-- 
-------------------------------------------------------
| Mohammed Elzubeir    | Visit us at:                 |
|                      |  http://www.arabeyes.org/    |
| Arabeyes Project     | Homepage:                    |
| Unix the 'right' way |  http://fakkir.net/~elzubeir/|
-------------------------------------------------------
---
Was I helpful? Let others know:
http://svcs.affero.net/rm.php?r=elzubeir

Attachment: pgp00015.pgp
Description: PGP signature