07/05/2014 16:01, Enrico Forestieri:
So, this depends on the font, apparently. Now I see both kerning and ligatures when using Dejavu Serif (even on Linux). However, placing the cursor between 'A' and 'V' does not modify the kerning, as well as placing the cursor between 'f' and 'i' does not break the ligature. This occurs only when selecting. Thus, when extending the selection, mimicking what is done when placing the cursor should avoid those artifacts (but I am speaking out of ignorance here, admittedly).
Placing the cursor is just a matter of drawing a blinking thing at some position. When there is a selection, however, the selection text is painted with its own color. This has been like that for ages. The only difference with the "system colors" thing you love to hate is that there is a different set of colors, and thus different things happen. But the code is the same.
I would think that this code with a different selected text color has been coded from the start by Matthias to allow for a monochrome mode, at the time when running on a Sun3/60 made sense.
It seems we tend to describe what happens in our own world. In my world "Use system colors" is never checked, while in your world it is always checked. Now, in my world, nothing of what you describe above happens. Math, change tracking and ERT maintain their colors when selecting.
I agree about math, in 2.1, although I thought that it changed. But try again with ERT, I doubt that it stays red.
Now I think I understand what you are trying to accomplish. You are trying to make your world more similar to mine.
No, I am just trying to make the current code work in a word where we respect ligatures and kerning. This is completely irrelevant to your nightmares about colors. The fact is that, if I want two pieces of the same word in different colors, I have to break kerning or break a ligature. If the word is in arabic, it can have very important consequences.
Though, I just noticed an ugly difference with respect to LyX 2.0. The background of math remains white when selecting. This does not happen in 2.0, where the math background is set to the right color. What changed here?
I do not know. I think we have a bug, but is is not related to my str-metrics branch AFAIK.
It seems that the lag is caused by Qt. With Qt4 there is no lag at all and, however fast I move the cursor, the selection follows instantly. With Qt5 there is a noticeable lag and it seems like playing to that old game where you have a growing snake following your moves...
That's not good. JMarc