summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2014-05-16 13:04:19 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-16 18:24:14 +0200
commit7952cf7e2705bd310ad8e8d0eca85a372e669fb3 (patch)
tree2baa3a13c9c21d896edf57f5b61fd1302e4951ca /src/gui
parent39efc7c3e3a08580f00a19678d2975608d41aa17 (diff)
Ensure we don't re-use webfonts where the "local" font has been requested
For webfonts, we can't rely on the fontDef (and hence the cache Key) alone, since the resulting fontcache key might be strictly identical. Instead we have to check if the cached engine doesn't belong to a webfont when we're looking for a "local" font. Change-Id: I2de11c8fdbef53362b66674d3429a042e1835757 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 6b05fa254f..a165330913 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -2085,7 +2085,7 @@ QFontEngine* QFontEngineMultiBasicImpl::createMultiFontEngine(QFontEngine *fe, i
while (it != end && it.key() == key) {
Q_ASSERT(it.value().data->type() == QFontEngine::Multi);
QFontEngineMulti *cachedEngine = static_cast<QFontEngineMulti *>(it.value().data);
- if (faceIsLocal || fe == cachedEngine->engine(0)) {
+ if (fe == cachedEngine->engine(0) || (faceIsLocal && fe->faceId().filename == cachedEngine->engine(0)->faceId().filename)) {
engine = cachedEngine;
fc->updateHitCountAndTimeStamp(it.value());
break;