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 <andy.shaw@digia.com>
This commit is contained in:
parent
43e8c1896d
commit
5cb581b3b4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user