]> git.lyx.org Git - features.git/commit
str_metrics: Prevent clipping of chars with negative bearing
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 6 Jan 2015 17:48:19 +0000 (18:48 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 6 Jan 2015 21:02:07 +0000 (22:02 +0100)
commitc313b1c8eb01c85775e62a8675fa569d2c2aac2c
tree73e5ae7071d8ee2b6c4b9205904d844692d8dd2d
parentbe22665ceb480c79a314cf613e020d430e7b0913
str_metrics: Prevent clipping of chars with negative bearing

This happens when part of the word is selected.

To reproduce:
1. Start a new document
2. Type "af"
3. Select 'a'
4. Observe that the right part of the 'f' is clipped away.

This patch uses QRegion to set a clip region that is everything except
the part that is drawn in another color.

Fixes: #9223.
src/frontends/qt4/GuiPainter.cpp