diff options
Diffstat (limited to 'core/fxge/cfx_facecache.cpp')
-rw-r--r-- | core/fxge/cfx_facecache.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/fxge/cfx_facecache.cpp b/core/fxge/cfx_facecache.cpp index c2051c30fc..08d95a0cb8 100644 --- a/core/fxge/cfx_facecache.cpp +++ b/core/fxge/cfx_facecache.cpp @@ -315,14 +315,16 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(const CFX_Font* pFont, #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) { if (!m_pTypeface) { + pdfium::span<const uint8_t> span = pFont->GetFontSpan(); m_pTypeface = SkTypeface::MakeFromStream( - new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())); + new SkMemoryStream(span.data(), span.size())); } #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ if (!m_pTypeface) { sk_sp<SkFontMgr> customMgr(SkFontMgr_New_Custom_Empty()); - m_pTypeface = customMgr->makeFromStream(pdfium::MakeUnique<SkMemoryStream>( - pFont->GetFontData(), pFont->GetSize())); + pdfium::span<const uint8_t> span = pFont->GetFontSpan(); + m_pTypeface = customMgr->makeFromStream( + pdfium::MakeUnique<SkMemoryStream>(span.data(), span.size())); } #endif return m_pTypeface.get(); |