diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-03-25 15:59:11 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-03-25 18:55:18 (GMT) |
commit | fc7b63d4ca216d4256185aa5d522d02dd27b224c (patch) | |
tree | 50bf323b9e8be7d07f640cae07eb1f6c354e2696 | |
parent | 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 (diff) | |
download | Qt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.zip Qt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.tar.gz Qt-fc7b63d4ca216d4256185aa5d522d02dd27b224c.tar.bz2 |
Fix remaining regressions in QWS
Reviewed-by: TrustMe
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qfontengine_ft_p.h | 1 | ||||
-rw-r--r-- | src/gui/text/qfontengine_qpf.cpp | 1 |
3 files changed, 7 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; diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index 054a57e..fc3ac82 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -254,6 +254,7 @@ private: virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix); virtual void recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const; + virtual QImage alphaMapForGlyph(glyph_t g) { return alphaMapForGlyph(g, 0); } virtual QImage alphaMapForGlyph(glyph_t, QFixed); virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix, diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index 2fd4716..bfd04e6 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -306,6 +306,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng glyphMapEntries = 0; glyphDataOffset = 0; glyphDataSize = 0; + glyphFormat = renderingFontEngine->glyphFormat; kerning_pairs_loaded = false; readOnly = true; |