[Fribidi-discuss] Some thoughts about BiDi Quirks Handling

Behdad Esfahbod behdad at bamdad.org
Mon Sep 23 05:38:02 EST 2002


Hi,

If you want my fast opinion, I don't like any quirks in fribidi.  
I will give you the api for overriding character types, for 
example, you can say that the '-' character should have type EN.  
I believe this will do what you want for the MS Word.

BTW, do you know of any implemented/specification-of BiDi 
algorithms other than Unicode's??  I mean, what do you want to 
implement??

Thats good to have some functions to setup a fribidienv for 
behaving as like MS Word as possible.

behdad

On Sat, 21 Sep 2002, Omer Zak wrote:

> Due to Microsoft's actions, there are more than one version of BiDi
> algorithm in use.  The Hebrew versions of different MS-Word versions
> implement slightly different BiDi algorithms.  I don't know what is the
> situation in Arabic and Persian.
> 
> In order for AbiWord and other Free Software word processors to fully
> replace Microsoft wordprocessors, it must be possible for them to
> faithfully import files produced by Microsoft wordprocessors, in *.doc
> and/or *.rtf formats.
> 
> But in addition to support for those file formats, the Free Software 
> wordprocessors need to implement compatible BiDi algorithms, so that the
> imported documents will look the same in both Microsoft wordprocessors and
> in Free wordprocessors.
> 
> The question is how to accommodate the above.
> 
> Possible approaches:
> --------------------
> 1. Implement few "quirks" flags in FriBidi (the FriBidiEnv structure has
>    room for those flags).  When set, those flags would cause FriBidi to
>    behave like one of the incompatible BiDi algorithms.
> 2. Add to FriBidi special code, which would flag the characters in a
>    string, which would be reordered differently in the different BiDi
>    algorithms.  The wordprocessor would then display those characters in a
>    different way, and let the user determine whether they were reordered
>    the way he intended to or not.
> 3. The import filters, used by the Free wordprocessors to import files
>    created by a given version of Microsoft wordprocessor, would insert
>    explicit BiDi overrides at those places where the BiDi algorithms would
>    produce different visual orderings of characters.
> 
> Of the possible approaches, I favor the most the "quirks" flags approach.
> When importing a document, the user has anyway to specify which
> wordprocessor created it.  It is not a big deal to specify also the
> corresponding BiDi algorithm version.
> 
> In the internal representation of documents used by Free wordprocessors,
> an extra field to specify the BiDi algorithm needs to be added.  But if
> the wordprocessor was designed in a reasonable way, it should not be
> difficult to add a paragraph-scope attribute to specify the BiDi algorithm
> to be applied to that paragraph.  (Note:  paragraph scope is needed to
> handle the case of an user, who wants to merge together documents created
> by different wordprocessors, which used different BiDi algorithms.) 
> 
>                                              --- Omer
> WARNING TO SPAMMERS:  see at http://www.zak.co.il/spamwarning.html
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Fribidi-discuss mailing list
> Fribidi-discuss at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fribidi-discuss
> 

-- 
Behdad Esfahbod		1 Mehr 1381, 2002 Sep 23 
http://behdad.org/	[Finger for Geek Code]

#define is_persian_leap(y) ((((y)-474)%2820+2820)%2820*31%128<31)





More information about the FriBidi mailing list