summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-04 16:06:46 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-09-11 07:43:38 +0000
commit170eddb183293bc5740e3d2af09f4bc0a65b985d (patch)
tree8848faa7e0e4a4e009b0f66a1dbad5624dbfa1f9
parent315a112f28b480e8e90d42a8ab45d1b448490939 (diff)
tdf#92505 vcl: fix substituting missing glyphs
Commit a6b00d16eb27a5e7e31c721671001a909ecef960 (Related bnc#822625: Cache FontEntry with the original FontSelectPattern.) and the follow-up 16a62079018aea0e72636bdb00576487b4e830b9 (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 e047caf4bb461fb168d9fe08228c049938ca1698) Reviewed-on: https://gerrit.libreoffice.org/18437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/source/outdev/font.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index eb98b2c2a184..1e4632939f63 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -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;