Allow me to chim in, I fully agree the Unicode Bidi algorithm is fairly difficult to work with.
I would suggest, if anyone has some cycle, to simply allow a complete buffer to draw RTL.
In this case it is likely to be short to implement and useful for most RTL-writing edits.


Le 4 mars 2012 à 20:41, Matthieu Casanova a écrit :

just for information, I did some investigation on RTL text painting, and it seems very complex to implement.
First jEdit is completely unable to paint any arabic or hebrew word correctly because it paints the letters in the wrong order.

I found this wiki page, it's in french but there is an easy test to understand :

It show the correct way to paint this arabic word إجتهاد
If someone copies that in jEdit he will get the same word but all letters in the wrong order.
I did some fixes in my local trunk and I'm now able to paint this kind of text, the problem is that 
if you read from left to right, the letter on the left end is the last letter.
So if you have the caret at the left of the word and press "del" it is not the letter next to the caret that is removed but the letter at the right end of the word
you get جتهاد
I also tried some editors that support Bidi, and it's very strange, when being in a LTR portion pressing home will go to the left end of the line, and if the caret is in the same line but in a RTL portion home will go to the right end.
However my fix allow to display arabic or hebrew text but probably only copying them is acceptable, editing them is a pain.
And it also works only for one word, if there is a sentence, all letters are reversed, but also words, so it requires to change the order of tokens to be able to paint them.

2012/3/1 Kazutoshi Satoda <>
Matthieu Casanova wrote:
there is a suggestion on uservoice to support right to left language
support in jEdit.
And since you started working a lot on chunks, glyphvectors and other
things related with our textarea, did you had the intention to work on that
too, or do you have any experience with right to left text painting ?

I don't have such intention. I have no experience with right to left
text painting, also editing.

We need at least one expert with enough motivation to implement it.
"Help Wanted" feature on may help?

However, I will be able to support such a new developer to find where to
change, if he/she can break the issue down into smaller and specific

Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
jEdit Developers' List