summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-03-25 15:59:11 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-03-25 18:55:18 (GMT)
commitfc7b63d4ca216d4256185aa5d522d02dd27b224c (patch)
tree50bf323b9e8be7d07f640cae07eb1f6c354e2696 /src/gui/painting/qpaintengine_raster.cpp
parent5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 (diff)
downloadQt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.zip
Qt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.tar.gz
Qt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.tar.bz2
Fix remaining regressions in QWS
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index d6cd98b..9f3b9b9 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3085,7 +3085,10 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
#if !defined(QT_NO_FREETYPE)
if (fontEngine->type() == QFontEngine::Freetype) {
QFontEngineFT *fe = static_cast<QFontEngineFT *>(fontEngine);
- QFontEngineFT::GlyphFormat neededFormat = fe->defaultGlyphFormat();
+ QFontEngineFT::GlyphFormat neededFormat =
+ painter()->device()->devType() == QInternal::Widget
+ ? fe->defaultGlyphFormat()
+ : QFontEngineFT::Format_A8;
if (d_func()->mono_surface
|| fe->isBitmapFont() // alphaPenBlt can handle mono, too
@@ -3527,7 +3530,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
if (glyphs.size() == 0)
return;
- if (!drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), ti.fontEngine))
+ if (!drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), fontEngine))
QPaintEngine::drawTextItem(p, ti);
return;