[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Hebrew and bidi support.

From: Daniel Johnson
Subject: Re: [Nano-devel] Hebrew and bidi support.
Date: Thu, 19 Dec 2002 10:07:47 +0200 (IST)

Thanks for the prompt replies,

> I presume you know Hebrew, and have some sort of Hebrew keyboard?  Anyway,
> could you send some example files?  I want a sample file in UTF-8, with
> some Hebrew text mixed in with English.  Also an all-Hebrew file.  And two
> images showing how they should be displayed (if you are using Linux, the
> xwd command takes a screen shot, assuming you have a program that can
> display the text correctly).

Fribidi comes with a demo hebrew file and shows what it should
look like (ISO-8859-8 though, not unicode).

I'll get to work on providing you with some more extensive samples.

> In a file with mixed Hebrew/English, in the Hebrew areas should the right
> arrow key make the cursor go left?

No, the cursor key functionality should remain the same.

> In an all Hebrew file, should the text be aligned at the right edge of the
> window?


> As far as I can tell, FriBidi takes a UTF-8 string, and inverts some of it
> to produce a displayable string.  Do you know of any other features of
> FriBidi?
> In particular, can it tell us where the cursor should go?

Yes it can. As I understand it all the skeleton stuff needed for a
bidi editor is in there, not just the displaying of text. A quick check
through the .h files gives a good idea.

An example of one of the things it can do (taken from fribidi.h) :

//  fribidi_xpos_resolve() does the complicated translation of
//  an x-coordinate, e.g. as received through a mouse press event,
//  to the logical and the visual position the xcoordinate is closest
//  to. It will also resolve the direction of the cursor according
//  to the embedding level of the closest character.

This function translates between 'visual' and 'logical' positions.

e.g. if we say capitals are an RTL character set

logical : abc DEF ghi
visual  : abc FED ghi

x-position 7 visually is actually position 5 logically (ie as stored in
memory or on disk).

> A non-trivial example program using FriBidi would be helpful if you
> know of one.

There are other people better equipped than me to answer this, for
example the people who added bidi support to Mozilla and
OpenOffice. I'll pass on your request to the Israeli Linux mailing list.

Daniel Johnson
Trust in the Lord with all your heart                
do not rely on your own understanding              
Proverbs 3:5

reply via email to

[Prev in Thread] Current Thread [Next in Thread]