From 560cd95298e76ee99b8d964d8ad53e0625b35f68 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 19 Dec 2014 06:44:21 +0400 Subject: [PATCH] Make it obvious we never expect QFontDatabase::Any to be supported This also unbreaks matching for scripts not covered by qt_script_for_writing_system(). Change-Id: Iddf015281a57a9dbae2e09f0408359441b020df8 Reviewed-by: Friedemann Kleint Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 42148f95c56..16b0b8d76d1 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1178,7 +1178,7 @@ static int match(int script, const QFontDef &request, load(test.family->name, script); // Check if family is supported in the script we want - if (script != QChar::Script_Common && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported)) + if (writingSystem != QFontDatabase::Any && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported)) continue; // as we know the script is supported, we can be sure