diff options
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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 |