[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-fribidi
Subject:    Re: [FriBidi] Mac OS X cont... with Ruby
From:       "Dov Grobgeld" <dov.grobgeld () gmail ! com>
Date:       2007-08-08 3:55:49
Message-ID: dc666480708072055g1134966dicc47ec2d8d4358f5 () mail ! gmail ! com
[Download RAW message or body]

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@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fribidi
>
>
_______________________________________________
fribidi mailing list
fribidi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/fribidi

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic