Check for required capability only when FC_CAPABILITY is available

If, by some reason, querying FC_CAPABILITY has failed,
believe FC_LANG unconditionally.

Change-Id: Idf94150359dff555f2a50ccaf146722407f43477
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Konstantin Ritt 2016-04-27 15:09:55 +04:00
parent fa93c7c7b0
commit 6493bcaf3c
1 changed files with 1 additions and 1 deletions

View File

@ -441,7 +441,7 @@ static void populateFromPattern(FcPattern *pattern)
&& requiresOpenType(j) && openType[j]) {
FcChar8 *cap;
res = FcPatternGetString (pattern, FC_CAPABILITY, 0, &cap);
if (res != FcResultMatch || !strstr((const char *)cap, openType[j]))
if (res == FcResultMatch && strstr(reinterpret_cast<const char *>(cap), openType[j]) == 0)
writingSystems.setSupported(QFontDatabase::WritingSystem(j),false);
}
}