[Fribidi-discuss] Re: BiDi WINE status and fribidi
Shachar Shemesh
fribidi-discuss at sun.consumer.org.il
Mon Aug 26 11:57:06 EST 2002
Behdad Esfahbod wrote:
>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.
>
>
I like that idea. I'm slightly worried about the include interface,
though. The only way we can have the same (post compile) function handle
all seven encodings is if give it an interface that doesn't care. I
don't like that idea. I like the idea of compile time (static) type
checking.
How about if we have a small wrapper function that fills in the type:
do_bidi_magic16(UTF16char *string, struct void *strange_parameter)
{
return do_bidi_magic_internal( (void *)string, strange_parameter,
CONSTANT_INDICATING_THAT_STRING_IS_UTF_16 );
}
>
>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
>>
>>
>
>
>
>
More information about the FriBidi
mailing list