[HarfBuzz] How to solve shaping after BiDi

Behdad Esfahbod behdad at behdad.org
Wed Oct 30 09:08:24 PDT 2013


You got it mostly right. I'll reply to you in detail next week. Traveling
right now.
On Oct 30, 2013 3:56 PM, "eduardo" <eduardo at brainstorm.es> wrote:

> 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<http://lists.freedesktop.org/mailman/listinfo/harfbuzz>
>>
>
> ______________________________**_________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/**mailman/listinfo/harfbuzz<http://lists.freedesktop.org/mailman/listinfo/harfbuzz>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20131030/de4e4621/attachment.html>


More information about the HarfBuzz mailing list