Use path-based text when painter has negative scale on raster/coretext

The CoreText font-engine is not able to produce glyphs with a negative
scale (flipped). We need to report this fact back to the raster paint
engine, so that it can fall back to painter-path based text drawing.

For the GL engine this is not an issue, as the engine is able to handle
the flipping itself, while still using a non-flipped glyph-cache.

Task-number: QTBUG-29284
Change-Id: I3c24cee091786faae8a5c5dd756d208163330bfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
bb10
Tor Arne Vestbø 2013-01-24 14:59:52 +01:00 committed by The Qt Project
parent a71c7fce8a
commit cd1e21cf09
1 changed files with 7 additions and 1 deletions

View File

@ -619,7 +619,13 @@ QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
bool QCoreTextFontEngine::supportsTransformation(const QTransform &transform) const
{
return transform.type() <= QTransform::TxScale;
if (transform.type() < QTransform::TxScale)
return true;
else if (transform.type() == QTransform::TxScale &&
transform.m11() >= 0 && transform.m22() >= 0)
return true;
else
return false;
}
QT_END_NAMESPACE