[HarfBuzz] harfbuzz versus fribidi

Behdad Esfahbod behdad.esfahbod at gmail.com
Tue Aug 25 05:26:24 PDT 2015


Thanks Eduardo for the excellent explanation!

On 15-08-22 03:27 PM, eduardo wrote:
> But if you want both things, you have to send the text first to FriBidi, then
> to harfbuzz and always tell harfbuzz the text is LTR, because fribidi already
> put the arabic characters in their correct order and harfbuzz will invert
> them. So in this case, you have to lie to harfbuzz and tell him arabic is LTR.

This works.  But proper way to do it is to NOT pass text to FriBidi for
reordering, but just get the bidi levels from FriBidi, break text into runs of
same direction and shape with HarfBuzz, then properly reorder the runs, using
this algorithm for example:

  http://github.com/behdad/linear-reorder

I should add API to FriBidi to align it better for use with HarfBuzz...

behdad


More information about the HarfBuzz mailing list