7#include "xfa/fgas/font/cfgas_defaultfontmanager.h"
9#include "core/fxcrt/fx_codepage.h"
10#include "core/fxge/fx_font.h"
11#include "third_party/base/numerics/safe_conversions.h"
12#include "xfa/fgas/font/cfgas_fontmgr.h"
13#include "xfa/fgas/font/cfgas_gefont.h"
14#include "xfa/fgas/font/cfgas_gemodule.h"
15#include "xfa/fgas/font/fgas_fontutils.h"
19 WideString wsFontName,
20 uint32_t dwFontStyles) {
22 RetainPtr<CFGAS_GEFont> pFont = pFontMgr->LoadFont(
23 wsFontName.c_str(), dwFontStyles, FX_CodePage::kFailure);
28 FGAS_FontInfoByFontName(wsFontName.AsStringView());
40 int32_t iLength = pdfium::base::checked_cast<int32_t>(strlen(pReplace));
42 const char* pNameText = pReplace;
43 while (*pNameText !=
',' && iLength > 0) {
47 WideString wsReplace =
48 WideString
::FromASCII(ByteStringView(pReplace, pNameText - pReplace));
63 uint32_t dwFontStyles) {
66 pFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, FX_CodePage::kFailure);
static RetainPtr< CFGAS_GEFont > GetDefaultFont(uint32_t dwFontStyles)
static RetainPtr< CFGAS_GEFont > GetFont(WideString wsFontName, uint32_t dwFontStyles)
RetainPtr< CFGAS_GEFont > LoadFont(const wchar_t *pszFontFamily, uint32_t dwFontStyles, FX_CodePage wCodePage)
static CFGAS_GEModule * Get()
CFGAS_FontMgr * GetFontMgr()
const wchar_t * c_str() const
static WideString FromASCII(ByteStringView str)
bool FontStyleIsItalic(uint32_t style)
#define FXFONT_FORCE_BOLD
bool FontStyleIsForceBold(uint32_t style)
const char * pReplaceFont