7#include "xfa/fxfa/cxfa_fontmgr.h"
9#include "core/fpdfapi/parser/cpdf_dictionary.h"
10#include "core/fxge/cfx_fontmgr.h"
11#include "core/fxge/cfx_gemodule.h"
12#include "xfa/fgas/font/cfgas_defaultfontmanager.h"
13#include "xfa/fgas/font/cfgas_gefont.h"
14#include "xfa/fgas/font/fgas_fontutils.h"
15#include "xfa/fxfa/cxfa_ffapp.h"
16#include "xfa/fxfa/cxfa_ffdoc.h"
18CXFA_FontMgr::CXFA_FontMgr() =
default;
22void CXFA_FontMgr::
Trace(cppgc::Visitor* visitor)
const {}
25 const WideString& wsFontFamily,
26 uint32_t dwFontStyles) {
27 auto key =
std::make_pair(wsFontFamily, dwFontStyles);
28 auto iter = m_FontMap.find(key);
29 if (iter != m_FontMap.end())
34 pDoc->GetPDFFont(wsEnglishName, dwFontStyles,
true);
40 pFont = pDoc
->GetPDFFont(wsEnglishName, dwFontStyles,
false);
54 m_FontMap[key] = pFont;
static RetainPtr< CFGAS_GEFont > GetDefaultFont(uint32_t dwFontStyles)
static RetainPtr< CFGAS_GEFont > GetFont(WideString wsFontName, uint32_t dwFontStyles)
static RetainPtr< CFGAS_GEFont > LoadStockFont(CPDF_Document *pDoc, const ByteString &font_family)
CPDF_Document * GetPDFDoc() const
RetainPtr< CFGAS_GEFont > GetPDFFont(const WideString &family, uint32_t styles, bool strict)
void Trace(cppgc::Visitor *visitor) const
RetainPtr< CFGAS_GEFont > GetFont(CXFA_FFDoc *hDoc, const WideString &wsFontFamily, uint32_t dwFontStyles)
static ByteString Format(const char *pFormat,...)
const wchar_t * c_str() const
WideString FGAS_FontNameToEnglishName(const WideString &wsLocalName)