From e4a910eb2afb85ea0daa64441215f917389a052d Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sat, 14 Sep 2013 10:12:47 +0300 Subject: [PATCH] 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 Reviewed-by: Konstantin Ritt --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index c2c8c15a30..e19e8d350f 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -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