Am 31.05.2007 um 23:05 schrieb Dov Feldstern:

Stefan, you are aware of http://permalink.gmane.org/ gmane.editors.lyx.devel/80783 and http://permalink.gmane.org/ gmane.editors.lyx.devel/81100, right?

Do they answer your questions? (It's a little hard to tell in your images what the differences are...)

Thanks for the links. Didn't know the posting. It's exactly what I was asking. So what was the conclusion? I guess nothing was changed?

About the bidi-algorithm: it is trivial actually to make the bidi algorithm dumb enough to handle space like any other character. I did that in one of my pictures in the last posting. Just set the is_space variable in bidi.cpp to false in the algorithm, that's it. With that my selection patch works and we have the behavior of the 1.5svn Latex output also in the GUI.

The reason I was pointing that out was that there is this mismatch between using bidi.level(...) to detect RTL positions and asking the font with Text::getFont. The latter does not handle spaces differently, the former does. The result is that the cursor position (i.e. Text::cursorX) is currently wrong if the space in front of a RTL word is part of the RTL segment.

So, what should we do now? I can fix either: I can make the getFont method to behave like the bidi algorithm, or I can make the bidi algorithm to handle spaces like normal characters, or I can make the cursorX method to compute the right position according to the bidi algorithm (at the moment its logic uses both, hence the bug), hence the bug would be gone, but we keep the difference between GUI and output. Opinions?

Stefan

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to