[FriBidi] Attributed unicode

Dov Grobgeld dov.grobgeld at gmail.com
Tue Feb 6 09:12:35 UTC 2018


We really should try to migrate the various bindings to github/fribidi .

There is no reason why the python binding does not return all the
output from the C function, and I think it should be fixed.

Somewhat unrelated, I just stub for a wiki at fribidi . It might be
nice to populate it with examples like your use case.

Regards,
Dov

On Tue, Feb 6, 2018 at 11:02 AM, Robin Becker <robin at reportlab.com> wrote:
> Thanks for the reply,
>
>> Robin,
>>
>> Why don't you track the position of your target (the CAPITAL LETTER I
>> here)
>> via the log2vis mapping that most bidi implementations, including FriBidi,
>> provide?
>>
>>
>> -Behnam
>
> unfortunately I know little about the internals of fribidi. I have been
> using work of others who contributed to reportlab quite a while ago.
> Although I have been interested in printing since the 70's I don't have a
> lot of knowledge in non-latin scripts. Currently reportlab routinely uses a
> very old version pyfribidi/fribidi. Looking in the pyfribidi code I see this
>
>
> fribidi_log2vis(logical, (const FriBidiStrIndex)length, &base_direction,
> visual,
>                              NULL, NULL, NULL)
>
> which I think is leaving out the mapping stuff entirely
>
> The pyfribidi code seems to be unmaintained for a long time and when I
> search fribidi I find fribidi_log2vis in fribidi-deprecated.c so I was a bit
> concerned I would be doing the wrong thing to try and improve based on the
> log2vis interface in pyfribidi.
>
> Is there a less deprecated interface to do text reordering/shaping or is it
> worth providing for the mapping with an improved pyfribidi log2vis?
> --
> Robin Becker
>
> On 05/02/2018 23:21, Behnam Esfahbod wrote:
>
>>
>>
>> On Mon, Feb 5, 2018 at 3:13 AM, Robin Becker <robin at reportlab.com> wrote:
>>
>>> Not sure if this is the right place to ask, but I would like to know if
>>> there's a way to attach attributes (eg colour) to the unicodes that enter
>>> the fribidi api. In the reportlab case we allow rather arbitrary changes
>>> to
>>> the unicode strings that represent text eg
>>>
>>> paragraph('<span color="red" fontSize="14">I</span>n the beginning.......
>>>
>>> where the initial capital I is larger and a different colour.
>>>
>>> If this happened in a word that I want to pass to fribidi is there a way
>>> to see where the attributes change in the return from fribidi? I imagine
>>> this must be an issue in html rendering as well.
>>>
>>> I looked at various unicode mechanisms (eg variation sequences), but none
>>> seem appropriate to changes of font, size, weight, style or colour.
>>> --
>>> Robin Becker
>>> _______________________________________________
>>> fribidi mailing list
>>> fribidi at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/fribidi
>>>
>>
>>
>>
>
>
> _______________________________________________
> fribidi mailing list
> fribidi at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fribidi


More information about the fribidi mailing list