diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-01-27 16:41:37 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-01-31 13:45:08 +0000 |
commit | 098d87c63fb638db619808af8b86c043354f62c5 (patch) | |
tree | fac6665aa5697853694d32e1b8f17bed692d28ef /src/gui/painting/qpainter.cpp | |
parent | 39fb26376c9718a8d09180c5947c2efec0d01adc (diff) |
Fix clipping error on some RTL text
There was a false assumption that the bidi level of text is only
used for visualizing the text, not for calculating its bounding
box. But the bidi level is required for shaping (indeed many
OpenType rules check for reading direction) and the glyphs used
to represent a given text may be different based on its
directionality. The effect would be that the bounding rect we
calculated for text would sometimes be too small for RTL text, and
we would end up clipping pixels.
[ChangeLog][QtGui][Text] Fixed clipping errors and too small
bounding rects for some right-to-left text.
Task-number: QTBUG-48005
Change-Id: Idd12ae1b0033d518034b582204ba47ae41795293
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 74b961f042..083e68fcdb 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7570,7 +7570,6 @@ start_lengthVariant: lineWidth = qMax<qreal>(0, r.width()); if(!wordwrap) tf |= Qt::TextIncludeTrailingSpaces; - textLayout.engine()->ignoreBidi = bool(tf & Qt::TextDontPrint); textLayout.beginLayout(); qreal leading = fm.leading(); |