[Bf-committers] Arabic support in text editing

Dalai Felinto dfelinto at gmail.com
Thu Oct 27 13:49:01 CEST 2011


Shaping itself is already "kind-of" handled by freetype2. It may look
wrong in some corner cases (e.g. those words that take off the
ground). But overall the result of getting the text in their
presentation form was working ok (not that I can tell good arabic from
bad arabic, but Yousef himself seemed pleased with the result).

Agree that fribidi may be buggy though. I'm my tests, at least the
standalone (known to be buggy) produced a different enough result from
our current _to_utf.py scripts.

I know nothing about ligatures and how opentype (i.e. harfbuzz) does
it better than freetype2. So I take your word for that.
But what I heard (chatting on #harfbuzz) is that harfbuzz does not
handle bi-di. I believe this is the reason why fribidi still plays an
important role (or another bidi algorithm) and pango was suggested
(given that it already integrates fribidi and harfbuzz).

--
Dalai

2011/10/26 Majid AL-Dharrab <majid at aldharrab.com>:
> Actually, fribidi's shaper is very primitive and rudimentary and it has lots
> of fundamental problems. It simply replaces letters with their Unicode
> presentation forms depending on their position in a word. That is not a good
> approach because it completely ignores ligatures and other OpenType
> features, leading to broken support for most modern fonts that use OpenType
> tables. That's why libass only uses a fribidi function that positions text
> characters in the correct order, following rules from Unicode's bidi
> algorithm (http://unicode.org/reports/tr9/#The_Paragraph_Level). Shaping is
> then handled by HarfBuzz, which a great OpenType shaper.
>
> Unfortunately, I'm not a developer, so I'm afraid I can't help any further
> with this issue. But you can contact libass's developer if you face any
> problems with either lib. His GSoC project was supporting complex and bidi
> scripts, so he probably knows a couple of tricks that might help. Good luck.
> :)
>
> On Wed, Oct 26, 2011 at 9:57 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
>
>> Thanks for the link.
>>
>> I looked at fribidi and found it interesting. Their standalone is
>> doing the same as we are with the python scripts (they call it log2vis
>> - to convert from logic to visual strings).
>>
>> Now, if we use this lib, do we still need harfbuzz? It seemed to me
>> that truetype2 can handle most of the layout, no?
>>
>> --
>> Dalai
>>
>> 2011/10/25 Majid AL-Dharrab <majid at aldharrab.com>:
>> > I guess you can't go wrong with harfbuzz-ng on freetype2. After all, that
>> is
>> > what's used to render text in Firefox. libass, the SSA subtitle renderer
>> > used in VLC and MPlayer, has recently started to support complex and bidi
>> > scripts using harfbuzz and fribidi on top of freetype2. That resulted in
>> > very sophisticated rendering of complex texts. Implementing that turned
>> out
>> > to be easier than the developer had thought.
>> >
>> >
>> http://ssadev.blogspot.com/2011/05/getting-complex-text-layout-into-libass.html
>> >
>> > I hope his experience helps make the issue a bit easier for our Blender
>> > devs. Good luck!
>> > _______________________________________________
>> > Bf-committers mailing list
>> > Bf-committers at blender.org
>> > http://lists.blender.org/mailman/listinfo/bf-committers
>> >
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list