[FriBidi] multiline fribidi
Cosmin Apreutesei
cosmin.apreutesei at gmail.com
Sun Jun 9 11:24:35 PDT 2013
> 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.
More information about the fribidi
mailing list