summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-04-20 16:30:01 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-04-20 16:30:01 (GMT)
commit4708acb70e1e71bf22e85f7335dcaf1401aba3bb (patch)
tree36043e3def5d50dde51846dea44e376e902524ac /src/gui/text
parent556216129bf5738c6ad92807ece1dac233b8b96f (diff)
parent07703ade86edcd6565c373f63e34306209d1a90a (diff)
downloadQt-4708acb70e1e71bf22e85f7335dcaf1401aba3bb.zip
Qt-4708acb70e1e71bf22e85f7335dcaf1401aba3bb.tar.gz
Qt-4708acb70e1e71bf22e85f7335dcaf1401aba3bb.tar.bz2
Merge branch '4.5'
Conflicts: tests/auto/qaction/tst_qaction.cpp
Diffstat (limited to 'src/gui/text')
-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);
}