Post by Otto Pattara Post by Leo Savernik
The only thing I can perceive from the small example is that the
text moves around slightly while selecting it. This is the bug I'm
Yes, then I think we are talking about the same thing.
Would you mind sharing me some more information about this bug or
pointing to some URLs or source code? Just when you have time...
Here you go:
Painting the selection:
Painting the text (and the selection in a different pass):
The problem is the fact that certain scripts combine adjacent characters when
drawn as a single text run. However, the selection may break the combining at
any point, thus producing two separate (and normally different looking)
characters, one in front of, and one after the selection boundary.
The proper solution would be to draw the full run, and clip it between the
combined characters (this will keep the characters from being drawn in their
separated form). However, there's no public API in Qt to retrieve the exact
point of clipping (or is there, Lars?).
Otto, feel free to work on the problem if you like. If you manage to achieve a
working result, I'd like to see the patches.