vcl/win/gdi/winlayout.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit f321113d71cca569624a848bdcb898cb04460137 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat May 14 11:56:19 2022 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat May 14 14:56:23 2022 +0200 Only obtain these after trying the cache Change-Id: Ia1ce426bb4734b669e3715776561cb94a1c6292f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 673b223a263f..8371c9577225 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -214,10 +214,6 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU static o3tl::lru_map<BlobCacheKey, BlobReference, BlobCacheKeyHash> gCache(50); WinFontInstance* pFont = static_cast<WinFontInstance*>(pUserData); - HDC hDC = pFont->GetGraphics()->getHDC(); - HFONT hFont = pFont->GetHFONT(); - assert(hDC); - assert(hFont); BlobCacheKey cacheKey{ rtl::Reference<vcl::font::PhysicalFontFace>(pFont->GetFontFace()), nTableTag }; @@ -228,6 +224,11 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU return it->second.mpBlob; } + HDC hDC = pFont->GetGraphics()->getHDC(); + HFONT hFont = pFont->GetHFONT(); + assert(hDC); + assert(hFont); + sal_uLong nLength = 0; unsigned char* pBuffer = nullptr;