diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-14 11:56:19 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-14 14:56:23 +0200 |
commit | f321113d71cca569624a848bdcb898cb04460137 (patch) | |
tree | 00633995cd597f714c31b2a9fd3cd762611732b0 /vcl/win | |
parent | 130552d925878fcf452a85fb5a60ae048dc12a60 (diff) |
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.kaganski@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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; |