Support placing cursor in ligature with mouse or touch
authorJiang Jiang <jiang.jiang@nokia.com>
Thu, 19 May 2011 08:29:49 +0000 (10:29 +0200)
committerQt Continuous Integration System <qt-info@nokia.com>
Mon, 30 May 2011 13:16:34 +0000 (15:16 +0200)
commit9f837af9458ea4825b9a8061de444f62d8a7a048
tree5aa4209b61c740a749dff50213d9e0733aedebba
parenta4ecb10eff83747ed0fec220071d6649722dc1a7
Support placing cursor in ligature with mouse or touch

We need to find out the closest element in the ligature to
the point we clicked (or tapped), currently we do this by
dividing the width of that ligature glyph evenly by the number
of characters it covered. We only support Common and Greek script
at this point, ligatures in other scripts are still handled as a
whole.

Task-number: QTBUG-19260
Reviewed-by: Eskil
(cherry picked from commit 5338d78aa9d80ddd2bcb21e6b22cd2cf1522a7d3)

Change-Id: Ic747e9458d561aca0848dcd1e8b94e0a23fd8189
Reviewed-on: http://codereview.qt.nokia.com/196
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/gui/text/qtextengine.cpp
src/gui/text/qtextengine_p.h
src/gui/text/qtextlayout.cpp
tests/auto/qtextlayout/tst_qtextlayout.cpp