diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index a123c147a2..66a4a43cba 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3078,7 +3078,8 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), ti.fontEngine); - } else if (matrix.type() < QTransform::TxProject) { + } else if (matrix.type() < QTransform::TxProject + && ti.fontEngine->supportsTransformation(matrix)) { bool invertible; QTransform invMat = matrix.inverted(&invertible); if (!invertible) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index e42b70427c..d950c4e45f 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5727,17 +5727,20 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText staticText_d->needsRelayout = true; } - // If we don't have an extended paint engine, or if the painter is projected, - // we go through standard code path - if (d->extended == 0 || !d->state->matrix.isAffine()) { - staticText_d->paintText(topLeftPosition, this); - return; - } - QFontEngine *fe = staticText_d->font.d->engineForScript(QChar::Script_Common); if (fe->type() == QFontEngine::Multi) fe = static_cast<QFontEngineMulti *>(fe)->engine(0); + // If we don't have an extended paint engine, if the painter is projected, + // or if the font engine does not support the matrix, we go through standard + // code path + if (d->extended == 0 + || !d->state->matrix.isAffine() + || !fe->supportsTransformation(d->state->matrix)) { + staticText_d->paintText(topLeftPosition, this); + return; + } + bool engineRequiresPretransform = d->extended->requiresPretransformedGlyphPositions(fe, d->state->matrix); if (staticText_d->untransformedCoordinates && engineRequiresPretransform) { // The coordinates are untransformed, and the engine can't deal with that |