Le 06/05/14 22:21, Vincent van Ravesteijn a écrit :
OK, I have an idea for having correct selections without loosing the
Color_selectiontext enum: we could draw the complete string as
selected and non-selected, but use clipping to make sure that only the
right part of the selection is visible. It will be a bit tricky, but
it is doable.

In LyX 2.0.7 coloring parts of arabic strings works ok. So, I'm not sure
why there is a problem here now. Ok, ligatures that should have
different parts colored differently is a bit difficult. My feeling is
that it is ok to split the ligatures in this exceptional case. The
contextual forms in arabic though are not ligatures and can be painted
in different colors without problems.

Actually, in master, the composition of character is done also by looking forward and therefore by using characters beyond the ones we are interested in. However, this is all hardcoded stuff, and I would like instead to rely on whatever information Qt can give me.

However, the question is: do we want to keep this Color_selectiontext
thing? It makes all selection lose color, which is not very helpful.
Therefore, we could just decide to forget about that and just use
Color_selection for the background. Actually, I haven't found any
wordprocessor-like application that uses a selection background color.

That wouldn't allow the monochrome style.. green text on black
background, and, when it is selected, black text on green background :(.

OK, if people are fond of 8bit-style monochrome colors, we can make efforts to keep that. But do you actually like the fact that selected text loses all color indication and becomes just monochrome?

Therefore I have to make my clipping trick work. Currently on str-metrics selection of plain Rnglish text when a font has some kerning is just not usable.

The bigger problem will be cursor positioning, but I need more
information from people who understand Arabic writing to progress on
that.

What info do you need ?

What is the difference between a ligature and a contextual form? Are there in arabic Compose character that do not really have their own width (like accents in latin scripts), but decorate another character?

I want to have some feeling of how this works. If you have a web page for newbies describing these features, this would be perfect. Also, what program is supposed to have a sound implementation of these languages in terms of behavior? Word? LibreOffice?

I am not sure when I will have time to continue, but I want to understand all these things.

And first I will probably try to implement your idea of using Qt to place cursor.

JMarc

Reply via email to