Re: multiline fribidi
Cosmin Apreutesei <[email protected]> Sun, 9 Jun 2013 21:24:35 +0300
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <CAKJdRan6GB3A1W=Tn9PvSSc-DykgEyue=8V66QOXi1LH29QmpQ@mail.gmail.com> |
> The bidi algorithm assumes that that line breaking is done *before* > reordering. You need to carry the over the paragraph bidirectional direction > from line to line, but that is done after the lines have been broken into > paragraphs. So if I understand correctly, for a multi-line paragraph string, I should do the following: - for the whole string, call fribidi_get_bidi_types() fribidi_get_par_direction() fribidi_get_par_embedding_levels() fribidi_get_joining_types() fribidi_join_arabic() fribidi_shape() - for each line substring, call fribidi_reorder_line(), passing a pointer to bidi_types and embedding_levels at the offset where the line starts, and the resolved base direction that was computed once for the whole string, is that correct? Before I study pango some more, AFAIU the output from the bidi should be passed to harfbuzz for each run containing the same (script, direction, lang) combination. This may sound dumb, but can these runs be identified automatically, or is something that the user must be explicit about? At least from bidi, I should know what is the direction for each run. Thanks for the info and sorry if my questions still sound confused, I'm learning as I go.