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>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2011-09-26 14:34:15 +02:00 committed by Qt by Nokia
parent c87dcd9a5d
commit 07107959ec

View File

@ -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) {