summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffapp.cpp9
-rw-r--r--xfa/fxfa/cxfa_ffapp.h3
2 files changed, 3 insertions, 9 deletions
diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp
index 8ec23e19c4..e3ca42c129 100644
--- a/xfa/fxfa/cxfa_ffapp.cpp
+++ b/xfa/fxfa/cxfa_ffapp.cpp
@@ -62,12 +62,9 @@ CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() const {
CFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() {
if (!m_pFDEFontMgr) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- m_pFDEFontMgr = CFGAS_FontMgr::Create(FX_GetDefFontEnumerator());
-#else
- m_pFontSource = pdfium::MakeUnique<CFX_FontSourceEnum_File>();
- m_pFDEFontMgr = CFGAS_FontMgr::Create(m_pFontSource.get());
-#endif
+ m_pFDEFontMgr = pdfium::MakeUnique<CFGAS_FontMgr>();
+ if (!m_pFDEFontMgr->EnumFonts())
+ m_pFDEFontMgr = nullptr;
}
return m_pFDEFontMgr.get();
}
diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h
index 351ba032a0..2ce718a36a 100644
--- a/xfa/fxfa/cxfa_ffapp.h
+++ b/xfa/fxfa/cxfa_ffapp.h
@@ -67,9 +67,6 @@ class CXFA_FFApp {
std::unique_ptr<CFGAS_FontMgr> m_pFDEFontMgr;
std::unique_ptr<CXFA_FontMgr> m_pFontMgr;
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- std::unique_ptr<CFX_FontSourceEnum_File> m_pFontSource;
-#endif
std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr;
// |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former