[FriBidi] Mac OS X cont... with Ruby

Dov Grobgeld dov.grobgeld at gmail.com
Tue Aug 7 20:55:49 PDT 2007


The logical to visual conversion takes place in the function:

  FRIBIDI_API fribidi_boolean
  fribidi_log2vis (FriBidiEnv *fribidienv,
                                               /* input */
                                              const FriBidiChar *str,
                                               FriBidiStrIndex len,
                                               FriBidiCharType *pbase_dirs,
                                               /* output */
                                               FriBidiChar *visual_str,
                                               FriBidiStrIndex
*position_L_to_V_list,
                                               FriBidiStrIndex
*position_V_to_L_list,
                                               FriBidiLevel
*embedding_level_list);

You just pass in a UCS-4 encoded string in logical order and it is
output in visual order. You may pass in NULL for the FriBidiEnv. The
function returns any of for entities if the pointers passed in are
NULL.

The tests are done by translating back and forth between ASCII and
certain Unicode characters (internally called CapRTL) so that the
functionality of reordering may be tested with Latin characters only.

Regards,
Dov

On 8/8/07, Nir Soffer <nirs at freeshell.org> wrote:
>
>
> On Aug 7, 2007, at 21:30, Till Vollmer wrote:
> I am a totally newbie to fribidi. Is there somewhere a simple example that
> shows how to use it for simple log2vis usage? I guess the executeable
> fribidi is a good start.
> I am doing a wrapper for Ruby and basically need to convert UTF8 logical to
> visual.
>
> I guess the python wrapper code can help:
> http://pyfribidi.sourceforge.net/
>
> Check specially pyfribidi.c.
>
>
>
>
>
> Best Regards,
>
>
>
>
> Nir Soffer
>
> _______________________________________________
> fribidi mailing list
> fribidi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fribidi
>
>


More information about the fribidi mailing list