Kaydet (Commit) 170eddb1 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Michael Meeks

tdf#92505 vcl: fix substituting missing glyphs

Commit a6b00d16 (Related bnc#822625:
Cache FontEntry with the original FontSelectPattern.) and the follow-up
16a62079 (Oops, this reference can't be
const., 2014-05-28) changed the font cache key, so that it's directly
what was the argument to ImplFontCache::GetFontEntry(), which leads to
missing glyphs in the bugdoc, e.g. the 4 check mark characters are
rendered as a check mark only in the DejaVu Sans case on my machine, the
other 3 cases result in placeholders.

Fix the problem by changing back the key to aFontSelData, which is
possibly modified in ImplFontCache::GetFontEntry() before used as a key.

Change-Id: I80eb4ba0f986a10100b6ae421d1346f235ce83b7
(cherry picked from commit e047caf4)
Reviewed-on: https://gerrit.libreoffice.org/18437Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 315a112f
......@@ -1258,7 +1258,6 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
FontSelectPattern& aFontSelData )
{
const FontSelectPattern aFontSelDataOrig(aFontSelData);
// check if a directly matching logical font instance is already cached,
// the most recently used font usually has a hit rate of >50%
ImplFontEntry *pEntry = NULL;
......@@ -1345,9 +1344,8 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
}
#endif
// Add the new entry to the cache with the original FontSelectPattern,
// so that we can find it next time as a direct cache hit.
maFontInstanceList[ aFontSelDataOrig ] = pEntry;
// add the new entry to the cache
maFontInstanceList[ aFontSelData ] = pEntry;
}
mpFirstEntry = pEntry;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment