From 5cb581b3b4c3305a0dfebead1ec7049ab6f2ebc4 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 21 Jul 2014 15:56:41 +0200 Subject: [PATCH] Windows: Default to MS Shell Dlg 2 In Qt 4, the default font for unrecognized font families would be MS Shell Dlg 2, which is an alias for the default UI font on the system. However, QFont::defaultFamily() had not been updated to match this and would return MS Sans Serif instead, which was the default UI font on Windows 9x. This is a raster font and not really suitable for modern UIs. In Qt 5, the problem with defaultFamily() was fixed, but Arial would be returned as the default instead. Enter change afd6313755399b24fb97e56f730f9898a0fa8f5a which tried to revert the change to defaultFamily() and return MS Sans Serif again. However, since it changed the actual default family and not just the one returned by the function, this broke several tests which depended on having a scalable default font. This change sets the default family to MS Shell Dlg 2 like in Qt 4. The fact that defaultFamily() now reports the actual default is regarded as a bug fix, so we will not change this. Fixes some XFAILs in qtdeclarative. [ChangeLog][Windows] Set default fallback font to MS Shell Dlg 2 instead of Arial. Task-number: QTBUG-39961 Change-Id: Ib08dfc7f2c00475d54d565bb933d1d2f8a3a3d90 Reviewed-by: Andy Shaw --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 7058406b4a1..19b9bb555a7 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1643,7 +1643,7 @@ QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFon break; case QFont::System: default: - result << QString::fromLatin1("MS Sans Serif"); + result << QString::fromLatin1("MS Shell Dlg 2"); break; }