summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-02 02:03:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-02 02:03:07 (GMT)
commit179cc58660d4ba274ac95e39ed3cfb2845054121 (patch)
treee5b5b8a795cb7d2bcd5273d02b7ab2d65175348f /src/gui/painting
parent0fd09af3a05ac88c55fed73c85dc1c5aba68f057 (diff)
parent673d3af547ada38a489b06b21d11e77a9bb1d4a3 (diff)
downloadQt-179cc58660d4ba274ac95e39ed3cfb2845054121.zip
Qt-179cc58660d4ba274ac95e39ed3cfb2845054121.tar.gz
Qt-179cc58660d4ba274ac95e39ed3cfb2845054121.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Some optimizations for QImage::load() fix setRawData() Fix QML crashes on the N900 doc: Added DITA XML generator Fix build failure on Symbian 3.1. Add the Qt::TextBypassShaping flag. QTextEngine: skip an unnecessary call to GetDeviceCaps on Windows. Add my 4.7.0 changes qdoc: Added DITA XML generator doc: Fixed confusing ownership issue. update Russian translations for Qt tools update Russian translation for Qt libraries QXmlSchema documentation correction doc: Changed last breadcrumb to not be a link. doc: Fixed reference to setSize(), which is in QRectF. QNetworkCookie: do not accept cookies with non-alNum domain QtDeclarative: Remove trailing commas in enums Doc: MonotonicClock is obviously monotonic
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 4596754..e460b7b 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5948,6 +5948,23 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
if (!d->engine || str.isEmpty() || pen().style() == Qt::NoPen)
return;
+ if (tf & Qt::TextBypassShaping) {
+ // Skip harfbuzz complex shaping, shape using glyph advances only
+ int len = str.length();
+ int numGlyphs = len;
+ QVarLengthGlyphLayoutArray glyphs(len);
+ QFontEngine *fontEngine = d->state->font.d->engineForScript(QUnicodeTables::Common);
+ if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, 0)) {
+ glyphs.resize(numGlyphs);
+ if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, 0))
+ Q_ASSERT_X(false, Q_FUNC_INFO, "stringToCMap shouldn't fail twice");
+ }
+
+ QTextItemInt gf(glyphs, &d->state->font, fontEngine);
+ drawTextItem(p, gf);
+ return;
+ }
+
QStackTextEngine engine(str, d->state->font);
engine.option.setTextDirection(d->state->layoutDirection);
if (tf & (Qt::TextForceLeftToRight|Qt::TextForceRightToLeft)) {