Minor optimization

Querying the "extra" fallback fonts (which are hard-coded names, actually)
for family only makes sense for scripts that cover more than just a single WS;
these currently are Common (<-Inherited) and Han.

Change-Id: I37682f1ae51a476a21b933607de48b01255cf1c3
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Konstantin Ritt 2013-09-14 10:12:47 +03:00 committed by The Qt Project
parent 13c246ee11
commit e4a910eb2a

View File

@ -1623,7 +1623,8 @@ QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFon
result << QString::fromLatin1("Arial");
}
result.append(extraTryFontsForFamily(family));
if (script == QChar::Script_Common || script == QChar::Script_Han)
result.append(extraTryFontsForFamily(family));
if (QWindowsContext::verboseFonts)
qDebug() << __FUNCTION__ << family << style << styleHint