[HarfBuzz] How to solve shaping after BiDi

eduardo eduardo at brainstorm.es
Wed Oct 30 08:56:03 PDT 2013


BiDi/harfbuzz integration code samples are also welcome

On Mon, 28 Oct 2013 12:48:09 +0100, Eduardo Castineyra wrote:
> Hi,
>
> I have an unicode string with the bidi already solved, but I don't
> know exactly how to feed harfbuzz with the result. There is a list of
> things I don't know and finally my guess on how this should be 
> solved:
>
> 1) Given the friBiDi already switched the order of the glyhs, do I
> still need to set the buffer direction to RTL ?
> 2) Do I have to shape each unidirectional segment separately? How do
> I manage the clusters?
> 3) How do I combine the L_to_V output from friBiDi with the hb 
> clusters?
>
> Could you please correct me if I got something wrong with this 
> algorithm?
>
> from friBiDi, I'm using only the l2v, v2l and RTL props, and
> completely discarding the glyhps:
>
> 1) friBiDi pass
> 2) Using the l2v list identify the direction of every character
> 3) Split the original text into monodirectional runs.
> 4) For each run, we save the lowest visual position (LVP) and the
> lowest logical position (LLP)
> 5) Shape every segment separately (setting the appropriate buffer 
> direction).
> 6) Sort the segments based on their LVP
> 7) Add the LLP to the cluster of every glyph.
>
> Isn't there an easier way to do this?
>
> Thanks!
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz




More information about the HarfBuzz mailing list