diff options
Diffstat (limited to 'core/fxge/ge/cfx_facecache.cpp')
-rw-r--r-- | core/fxge/ge/cfx_facecache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp index 69be8a1535..2a8e71acf5 100644 --- a/core/fxge/ge/cfx_facecache.cpp +++ b/core/fxge/ge/cfx_facecache.cpp @@ -21,6 +21,11 @@ #if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ #include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkTypeface.h" + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#include "third_party/skia/include/ports/SkFontMgr.h" +#include "third_party/skia/include/ports/SkFontMgr_empty.h" +#endif #endif namespace { @@ -359,6 +364,13 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) { new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())) .release(); } +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + if (!m_pTypeface) { + sk_sp<SkFontMgr> customMgr(SkFontMgr_New_Custom_Empty()); + m_pTypeface = customMgr->createFromStream( + new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())); + } +#endif return m_pTypeface; } #endif |