diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-01 15:57:26 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-01 15:57:26 (GMT) |
commit | 673d3af547ada38a489b06b21d11e77a9bb1d4a3 (patch) | |
tree | ea1f6223c2d2e5cf31d4345216eaea9201e396a5 /src/gui/painting/qpainter.cpp | |
parent | 0b034e816994f3c6ad5ba5e0e9f7c0c60ab9440d (diff) | |
parent | 2c8f9dee611ed403ef129d5e3a3f9f5883bfd08b (diff) | |
download | Qt-673d3af547ada38a489b06b21d11e77a9bb1d4a3.zip Qt-673d3af547ada38a489b06b21d11e77a9bb1d4a3.tar.gz Qt-673d3af547ada38a489b06b21d11e77a9bb1d4a3.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/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 657229a..54e0aa3 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5937,6 +5937,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)) { |