diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-12-19 06:38:06 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2014-12-23 05:37:57 +0100 |
commit | 3cda2ab03af655389a84b011d2eba8904b9658b6 (patch) | |
tree | b749a9b30a305c3cee1ade8eb94b6e9888b77a0b /src | |
parent | cd96a34d6db821aa24275fedf1c58eda2b34973a (diff) |
[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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index e465b9d9ca..89d2272828 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -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, |