[Top][All Lists]

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

Re: [Bug-zile] Bidirectional support in Zi

From: sergei karhof
Subject: Re: [Bug-zile] Bidirectional support in Zi
Date: Wed, 15 Feb 2012 17:11:20 +0100

>Interesting.  Then, in the first instance, what additional support is
>needed in Zile/Zi to use the bidirectional facility in mlterm?

Honestly, I don't know. But I assume that bidirectionality might be
default in mlterm, because I don't remember setting any bidirectional
option when I installed it (I may be wrong, of course). I will check.

>I'd have thought it should just work if you select the appropriate font and 

It might also work right away. There is one little point, though,
which will definitely have to be 'hardcoded' within the text-editor,
rather than simply relying on the bidirectional support provided by
the terminal, and that is the direction of the arrow keys. When you
press the left arrow, in some environments that have an otherwise good
RTL support, the cursor moves to the *previous* character, which is on
the right; this is based on the assumption, which is true only in a
LTR environment, that left equals previous character. This
counterintuitive behaviour of arrow keys is an annoyance for RTL
users. If I use the left arrow, I expect and want the cursor to move
left, always, even if  am writing in Hebrew or Arabic. This problem
affects both Vim and Mined, and *partly* gedit (the direction of arrow
keys is ok, but if you use ctrl+arrow key, it moves in the wrong
direction). Gladly, Emacs (latest devel. version) got it right, so its
code can serve as an inspiration.
I guess that the trivial solution would be: checking the type of
character at the current position, if it belongs to the RTL set of
characters, invert the direction of the arrow keys; if not, make the
arrow behave normally.

>If you write lua already, or wish to learn, then please send a rough
>implementation of bidi support on mlterm against one of the Lua
>branches of Zile to show us what needs to be done.

Unfortunately, I do not have that much technical expertise. But I can
help with beta testing.

>Alternatively, please write or point to technical instructions on how to
>support the same, and I'll try to find time to make a start on a patch.

>Be aware though, that open source relies on people who are interested in
>having new features working on them... I would never make use of bidi
>support myself, so it's kinda low on my personal priorities...

Since you have not released Zi yet, I cannot test it within mlterm,
but you can.
What I suggest is: copy and paste an Arabic text in Zi, and send me
the screenshot.
You can copy and paste any paragraph from

I will look at the screenshot and tell you if the text is rendered correctly.
If you try it in mlterm, the RTL text may already be fine, without the
need for any coding effort. In that case, the only adjustment needed
would be changing the direction of the arrow keys, and we are ready to


reply via email to

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