Re: FriBidi's rendering pipeline (was Re: what encoding? where are the docs?)
Shachar Shemesh <[email protected]>
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <[email protected]> |
Behdad Esfahbod wrote:
>On Tue, 20 Sep 2005, Shachar Shemesh wrote:
>
>
>
>>A while back we discussed a change in the interface, where labeling the
>>characters would be a different pass than reordering them. We also
>>discussed doing it in such a way that the reordering algorithm can work
>>directly with any width characters, transparently.
>>
>>
>
>Hi Shachar,
>
>The code in fribidi2 module already separates many things, now
>you would do:
>
>=========================
>
> /* analyze */
> fribidi_get_bidi_types
> fribidi_get_par_embedding_levels
>
> /* shape */
> fribidi_get_joining_types
> fribidi_join_arabic
> fribidi_shape
>
> break lines
>
> /* reorder */
> fribidi_reorder_line
>
>=========================
>
>
So if, say, in Wine, I'm asked to not perform shaping, I just skip the
last call right before the reordering? I like.
>The whole Arabic part is optional, needless to say.
>
So long as we don't get anyone writing for Hebrew and missing out on
these, that's fine. Is the traditional "log2vis" simply calling the new
functions? I couldn't manage to figure it out (yes, I did pull the CVS
sources, but I didn't have a whole lot of time to invest in it).
> The good
>thing about this very low-level and verbose API is that you have
>full control over the data flow and can change data in the middle
>steps, if need be. For example, after getting the bidi types,
>you can go on and change the types for new line characters to
>make them line breaks, and two consecutive new line characters
>paragraph separators.
>
Actually, and I mentioned it in the past (which probably triggered the
change in the first place) Windows has an obscure and rarely used API by
which you can actually override the types.
>I like to make mirroring verbose too, such that you call
>fribidi_get_mirroring on the str and pass the result to
>fribidi_shape, but I'm not sure it's a good idea, since what a
>hypothetical fribidi_get_mirroring returns, practically replaces
>the original string. In other words, mirroring is really part of
>the shaping process itself.
>
I agree. We need to be able to turn it off, but seperating it is not
crucial IMHO.
Let's remeber that we need this API to be fast, as well as functional.
Shachar