diff options
Diffstat (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fontmgr.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 5bb4ccb816..d191ce3537 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1775,18 +1775,17 @@ CFGAS_GEFont* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, CFX_WideString wsReplace = CFX_WideString(pReplace, pNameText - pReplace); pFont = pFDEFontMgr->LoadFont(wsReplace.c_str(), dwStyle, wCodePage); - if (pFont) { + if (pFont) break; - } + iLength--; pNameText++; pReplace = pNameText; } } } - if (pFont) { + if (pFont) m_CacheFonts.Add(pFont); - } return pFont; } @@ -1804,9 +1803,8 @@ CFGAS_GEFont* CXFA_DefFontMgr::GetDefaultFont( } ASSERT(pFont); - if (pFont) { + if (pFont) m_CacheFonts.Add(pFont); - } return pFont; } struct XFA_PDFFONTNAME { |