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 <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This commit is contained in:
Konstantin Ritt 2014-12-19 06:44:21 +04:00
parent a0742ad6ce
commit 560cd95298

View File

@ -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