summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_win.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jkobus@trolltech.com>2009-04-27 12:27:37 (GMT)
committerJarek Kobus <jkobus@trolltech.com>2009-04-27 12:27:37 (GMT)
commitfa6b4a76291229f29b21063f1ee8d550aec8c48b (patch)
tree53827b4eaeb564d7de37bdcb845c05af30d35f5f /src/gui/text/qfontdatabase_win.cpp
parent96a27e24eec9356e45f1a6b6ff641a9afab24a39 (diff)
parent63a4d6652aa8d84282083e49217120c97bb0bfc8 (diff)
downloadQt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.zip
Qt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.tar.gz
Qt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/gui/text/qfontdatabase_win.cpp')
-rw-r--r--src/gui/text/qfontdatabase_win.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase_win.cpp b/src/gui/text/qfontdatabase_win.cpp
index c9f5586..780ae28 100644
--- a/src/gui/text/qfontdatabase_win.cpp
+++ b/src/gui/text/qfontdatabase_win.cpp
@@ -699,6 +699,7 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
}
bool stockFont = false;
+ bool preferClearTypeAA = false;
HFONT hfont = 0;
@@ -799,10 +800,12 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
#endif
if (request.styleStrategy & QFont::PreferAntialias) {
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP)
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP) {
qual = 5; // == CLEARTYPE_QUALITY;
- else
+ preferClearTypeAA = true;
+ } else {
qual = ANTIALIASED_QUALITY;
+ }
} else if (request.styleStrategy & QFont::NoAntialias) {
qual = NONANTIALIASED_QUALITY;
}
@@ -884,6 +887,9 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
}
QFontEngineWin *few = new QFontEngineWin(font_name, hfont, stockFont, lf);
+ if (preferClearTypeAA)
+ few->glyphFormat = QFontEngineGlyphCache::Raster_RGBMask;
+
// Also check for OpenType tables when using complex scripts
// ### TODO: This only works for scripts that require OpenType. More generally
// for scripts that do not require OpenType we should just look at the list of
@@ -1134,7 +1140,7 @@ static void getFamiliesAndSignatures(const QByteArray &fontData, QFontDatabasePr
signature.fsUsb[1] = qFromBigEndian<quint32>(table + 46);
signature.fsUsb[2] = qFromBigEndian<quint32>(table + 50);
signature.fsUsb[3] = qFromBigEndian<quint32>(table + 54);
-
+
signature.fsCsb[0] = qFromBigEndian<quint32>(table + 78);
signature.fsCsb[1] = qFromBigEndian<quint32>(table + 82);
}