Samstag, 9. Juli 2011

Simple Arabic shaping

FriBidi contains a simple Arabic shaper. This shaper is based around the fact that Unicode contains codepoints for presentational forms of many Arabic characters, for traditional reasons. This can be great, as it allows very easy and simple shaping by analyzing the text, without doing any font-specific lookups. However, more advanced shaping features are not possible.

Just now I added support for FriBidi's simple Arabic shaper to libass. The bug about Arabic support contains a test case, and this renders great now.


Work to use a "real" shaper, i.e. HarfBuzz, is already under way, of course. :)

2 Kommentare:

  1. This looks good for just FriBiDi. I wanted to try compiling libass after this commit to test some of the common issues when working with bidi SSA subtitles, like punctuations at the beginning/end of lines, embedding numbers and LTR words in a RTL context and vice-versa, using tags for typesetting, using the karaoke tag ..etc
    I tried compiling your standalone renderer but it had some problem not finding libharfbuzz.so.0. So I tried compiling Aegisub with an updated libass directory but I ended up with some wxWidgets problems. Now, I'm trying to do it with MPlayer and hopefully it will work. It would be great if there was any sort of documentation concerning this.

    AntwortenLöschen
  2. Hey Majid,

    all this is still very much in development, but using a bidi-enabled libass with MPlayer or mplayer2 should definitely work. Just enable the external libass option in case you're using MPlayer and make sure to link dynamically. Same for Aegisub.

    Note that Karaoke currently doesn't work well with bidirectional text. Also, there is no way to force a certain paragraph text direction yet (I'm using FriBidi's autodetection).

    AntwortenLöschen