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>bb10
parent
39efc7c3e3
commit
7952cf7e27
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue