summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fontmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_fontmgr.cpp')
-rw-r--r--xfa/fxfa/cxfa_fontmgr.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp
index d5ba2ea807..5a11dd5dc0 100644
--- a/xfa/fxfa/cxfa_fontmgr.cpp
+++ b/xfa/fxfa/cxfa_fontmgr.cpp
@@ -36,9 +36,8 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
return iter->second;
WideString wsEnglishName = FGAS_FontNameToEnglishName(wsFontFamily);
- auto it = m_PDFFontMgrMap.find(hDoc);
- CFGAS_PDFFontMgr* pMgr =
- it != m_PDFFontMgrMap.end() ? it->second.get() : nullptr;
+
+ CFGAS_PDFFontMgr* pMgr = hDoc->GetPDFFontMgr();
CPDF_Font* pPDFFont = nullptr;
CFX_RetainPtr<CFGAS_GEFont> pFont;
if (pMgr) {
@@ -62,6 +61,7 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
pFont = m_pDefFontMgr->GetDefaultFont(
hDoc->GetApp()->GetFDEFontMgr(), wsFontFamily, dwFontStyles, wCodePage);
}
+
if (pFont) {
if (pPDFFont) {
pMgr->SetFont(pFont, pPDFFont);
@@ -72,16 +72,6 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
return pFont;
}
-void CXFA_FontMgr::LoadDocFonts(CXFA_FFDoc* hDoc) {
- if (!m_PDFFontMgrMap[hDoc])
- m_PDFFontMgrMap[hDoc] = pdfium::MakeUnique<CFGAS_PDFFontMgr>(
- hDoc->GetPDFDoc(), hDoc->GetApp()->GetFDEFontMgr());
-}
-
-void CXFA_FontMgr::ReleaseDocFonts(CXFA_FFDoc* hDoc) {
- m_PDFFontMgrMap.erase(hDoc);
-}
-
void CXFA_FontMgr::SetDefFontMgr(
std::unique_ptr<CFGAS_DefaultFontManager> pFontMgr) {
m_pDefFontMgr = std::move(pFontMgr);