diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-09-16 11:21:48 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-09-16 11:40:40 (GMT) |
commit | c0136ace31e5473493b2e366847968e30f7490a2 (patch) | |
tree | 4b1d5f3e13288143b7141ea9750f3d1e6004a014 /src/gui/text | |
parent | 37691f1c41bbe82305c5ab9fb7a861c24beb0359 (diff) | |
download | Qt-c0136ace31e5473493b2e366847968e30f7490a2.zip Qt-c0136ace31e5473493b2e366847968e30f7490a2.tar.gz Qt-c0136ace31e5473493b2e366847968e30f7490a2.tar.bz2 |
QFontMetrics::boundingRect(QString) returns incorrect width on Mac OS X
This bug appears only in Carbon port (ATSUI font engine). While finding
the character stops, this font engine relys on the RTL flags. As an
optimization, for this particular version of boundingRect(), BIDI is
ignored. So for this font engine, we will always use the correct RTL
flags.
Task-number: 213109
Done-with: Eskil
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index b43bd06..81c9142 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1396,8 +1396,12 @@ void QTextEngine::itemize() const int length = layoutData->string.length(); if (!length) return; - +#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) + // ATSUI requires RTL flags to correctly identify the character stops. + bool ignore = false; +#else bool ignore = ignoreBidi; +#endif if (!ignore && option.textDirection() == Qt::LeftToRight) { ignore = true; const QChar *start = layoutData->string.unicode(); |