diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-09-08 14:41:51 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-09-08 14:49:50 (GMT) |
commit | 5364fd96a72c89b281f0540da909fe64d0575ccf (patch) | |
tree | 5744050c1c878d62cee6e0f9273cf84cb0b7f5ea /config.tests/x11 | |
parent | 7499d6c71a6579968189386e1e06e2479c1a6747 (diff) | |
download | Qt-5364fd96a72c89b281f0540da909fe64d0575ccf.zip Qt-5364fd96a72c89b281f0540da909fe64d0575ccf.tar.gz Qt-5364fd96a72c89b281f0540da909fe64d0575ccf.tar.bz2 |
Take right bearing of glyphs into account when doing text layout
To support correctly breaking text and calculating the bounding rect
of text that has a right bearing (like italic text), we need to take
the bearing into account when doing the layout. We add the bearing when
checking whether we need to break the text, and we add it to the natural
width of the text whenever we've finished a text line, so that we get
the correct bounding rectangle.
This patch only takes the last glyph's bearing into account. The
theoretically correct approach would be to take all bearings into account
and use the one which gives the longest text width. However, in practice
the bearing of the glyph will not be great enough for it to span over
several other glyphs.
Also refactored a little to make the code simpler.
Task-number: 176401
Reviewed-by: Simon Hausmann
Diffstat (limited to 'config.tests/x11')
0 files changed, 0 insertions, 0 deletions