[Fribidi-discuss] Re: BiDi WINE status and fribidi

Behdad Esfahbod behdad at bamdad.org
Mon Aug 26 10:38:03 EST 2002


On Sun, 25 Aug 2002, Dov Grobgeld wrote:

> On Sun, Aug 25, 2002 at 11:25:52AM +0430, Behdad Esfahbod wrote:
> > You are a little wrong Dov, we are assuming 
> > sizeof (FriBidiChar) == 4, at least the compiler is assuming this 
> > when compiling, so its quite easy in compile time, but not so 
> > easy in run-time.  I prefer not to support it in run-time.
> 
> The number of places that FriBidiChar's are used is quite small
> and it would be possible to do an outer if for supporting different
> character encodings. I.e. I'm suggesting that we do:
> 
>     if (fribidienv->encoding == FRIBIDI_UCS4)
>       {
>         for (i = 0; i < len; i++)
> 	  char_type[i] = fribidi_get_type (fribidienv, str[i]);
>       }
>     else if (fribidienv->encoding ==FRIBIDI_UTF8)
>       {
>         utf8_iterator it8;
>         for (it8 = str; it8; it8 = utf8_next(it8))
> 	  char_type[i++] fribidi_get_type(utf8_char(it8));
>       }
>     else if (fribidienv->encoding == FRIBIDI_UTF16)
>       {
>         :
>       }
> 
> In such a case the only overhead for UCS4 is the additional if statements.
> Of course we can ifdef these away for some tight ports, but for a shared
> library on a desktop computer, I believe the overhead i negligable.
> 
> Or did I miss something?

Well, infact I like the idea, some idea:  "I will allocate one 
bit in FriBidiCharType to specify the "BeginOfChar" property, 
then I fix fribidi_analyze... to use this property, then we can 
handle any UTF-* in the way you offered.


Some other issues:  We're going to have a release of the current 
CVS STABLE branch as 0.10.5, and then I will stop working on 
STABLE branch (perhaps some bugfixes only), and will work just on 
the HEAD, to get it to somewhere, so the bleeding-edge people 
should migrate ASAP ;).

> Regards,
> Dov


-- 
Behdad Esfahbod		4 Shahrivar 1381, 2002 Aug 26 
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