diff -r 93b982ccede2 -r 5daf16870df6 src/gui/text/qfont.cpp --- a/src/gui/text/qfont.cpp Mon Jun 21 22:38:13 2010 +0100 +++ b/src/gui/text/qfont.cpp Thu Jul 22 16:41:55 2010 +0100 @@ -73,7 +73,7 @@ #endif #endif #ifdef Q_OS_SYMBIAN -#include "qt_s60_p.h" +#include #endif #include @@ -805,6 +805,9 @@ resolve_mask |= QFont::WeightResolved | QFont::StyleResolved; } + if (italic) + resolve_mask |= QFont::StyleResolved; + d->request.family = family; d->request.pointSize = qreal(pointSize); d->request.pixelSize = -1; @@ -1286,9 +1289,11 @@ \value PreferAntialias antialias if possible. \value OpenGLCompatible forces the use of OpenGL compatible fonts. - \value NoFontMerging If a font does not contain a character requested - to draw then Qt automatically chooses a similar looking for that contains - the character. This flag disables this feature. + \value NoFontMerging If the font selected for a certain writing system + does not contain a character requested to draw, then Qt automatically chooses a similar + looking font that contains the character. The NoFontMerging flag disables this feature. + Please note that enabling this flag will not prevent Qt from automatically picking a + suitable font when the selected font does not support the writing system of the text. Any of these may be OR-ed with one of these flags: @@ -1297,6 +1302,8 @@ \value PreferQuality prefer the best quality font. The font matcher will use the nearest standard point size that the font supports. + \value ForceIntegerMetrics forces the use of integer values in font engines that support fractional + font metrics. */ /*! @@ -2612,10 +2619,8 @@ } QT_CATCH (const std::bad_alloc &) { // no cache - just ignore } - if (cache && cache->hasLocalData()) { - cache->localData()->clear(); + if (cache && cache->hasLocalData()) cache->setLocalData(0); - } } #endif // QT_NO_THREAD @@ -2627,6 +2632,7 @@ QFontCache::~QFontCache() { + clear(); { EngineDataCache::ConstIterator it = engineDataCache.constBegin(), end = engineDataCache.constEnd();