Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.8.0
-
Reproducible on the Desktop and on the MeeGo Harmattan device
Description
When using selections in QAbstractTextDocumentLayout::PaintContext the glyphs might get clipped wrongly on the left if the left-bearing of those characters is negative (e.g. when using Thai glyphs). The clipping is correct if no selection in QAbstractTextDocumentLayout::PaintContext is done.
Attached is a Qt-only sample application that shows the issue.
I've also attached a patch against the Qt-4.8 branch, but I'm not sure whether it is acceptable in regards to backward compatibility. I was confused that QTextLayout::draw() completely ignores the clipping if no selection is used but uses the quite restrictive clipping as soon as a selection is there.
In libmeegotouch the general approach was that we use the margins/borders to avoid having clipped glyphs with bearings/accents, so one part of the patch in QTextDocumentLayout does not substract the document-margin anymore.
Please let me know whether I should provide an "official" merge-request (with gerrit?) or whether the fix must be done completely different anyhow. Thanks.