summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_qpa.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-11-30 11:28:30 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-01 09:12:00 +0100
commit13eba9ddf47d570fc4562c20fcfbacd1dfa4a61a (patch)
treea0752f31e8b4b688a1c38863c02e717855bdfcba /src/gui/text/qfontdatabase_qpa.cpp
parent98ebac7ede5aa4c16e6f204e0d37d9835a6fad6c (diff)
engineData should be cached solely based on QFontDef
Each QFontPrivate points to a QFontEngineData instance, which is essentially a mapping from different scripts to QFontEngines. Let's say we have QFont("Waree") and trying to use that for one text in Thai and another text in English, there should be only one QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1), QUnicodeTables::Thai -> QFontEngineMulti(2) ]. If we cache QFontEngineData using QFontCache::Key (which includes QFontDef, script and screen) as the key, then we will create two QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1) ] and [ QUnicodeTables::Thai -> QFontEngineMulti(2) ], so it will be pointless to have QFontEngineData at all. This bug was introduced in a 2005 refactoring (512f0e8c in history repo). Change-Id: I14677507e97682472cde9a0e1b594e903ec9e718 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qfontdatabase_qpa.cpp')
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 47d16b4259..55b9023c7c 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -348,7 +348,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
QFontCache::Key key(req, script, multi ? 1 : 0);
if (!d->engineData)
- getEngineData(d, key);
+ getEngineData(d, req);
// the cached engineData could have already loaded the engine we want
if (d->engineData->engines[script])