summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-26 14:34:15 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-26 16:05:36 +0200
commit07107959ecb5f7956b6970132d955d0cafb66bff (patch)
tree8f9b16731e128a2fb9c653a2fdc7d05d4c0c66df
parentc87dcd9a5df43abc9ee111b0051233a0fe9dd11a (diff)
Fix possible assert in QFontEngineFT
This is a regression caused by 070d9c00. If the defaultFormat is set to Format_None, we should default to Format_A8 like before the change. Change-Id: I8ad07abff96fc1dfa03c0c5b49d13beb36b9de70 Reviewed-on: http://codereview.qt-project.org/5540 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
-rw-r--r--src/gui/text/qfontengine_ft.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 6c351c0614..1ce73023b1 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1810,8 +1810,10 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
if (isBitmapFont())
neededFormat = Format_Mono;
- else if (neededFormat == Format_None)
+ else if (neededFormat == Format_None && defaultFormat != Format_None)
neededFormat = defaultFormat;
+ else if (neededFormat == Format_None)
+ neededFormat = Format_A8;
QFontEngineFT::QGlyphSet *gset = defaultGlyphs();
if (t.type() >= QTransform::TxScale) {