[QFontDatabase] Don't look for best foundry twice
In case the foundry name was empty and foundry lookup has failed, don't look for *any* foundry since it does exactly the same as previous call. Change-Id: I2a81949df06c31e1ae6999a6bbbe973408d4b814 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>bb10
parent
cd96a34d6d
commit
3cda2ab03a
|
|
@ -1166,7 +1166,7 @@ static int match(int script, const QFontDef &request,
|
|||
bestFoundry(script, score, request.styleStrategy,
|
||||
test.family, foundry_name, styleKey, request.pixelSize, pitch,
|
||||
&test, force_encoding_id, request.styleName);
|
||||
if (test.foundry == 0) {
|
||||
if (test.foundry == 0 && !foundry_name.isEmpty()) {
|
||||
// the specific foundry was not found, so look for
|
||||
// any foundry matching our requirements
|
||||
newscore = bestFoundry(script, score, request.styleStrategy, test.family,
|
||||
|
|
|
|||
Loading…
Reference in New Issue