#include "xfa/fgas/font/cfgas_pdffontmgr.h"
#include <algorithm>
#include <array>
#include <iterator>
#include <utility>
#include "core/fpdfapi/font/cpdf_font.h"
#include "core/fpdfapi/page/cpdf_docpagedata.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/fpdf_parser_utility.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxge/fx_font.h"
#include "xfa/fgas/font/cfgas_fontmgr.h"
#include "xfa/fgas/font/cfgas_gefont.h"
namespace {
FontNameEntry;
constexpr auto kXFAPDFFontNameTable = …;
ByteString PsNameToFontName(const ByteString& strPsName,
bool bBold,
bool bItalic) { … }
bool PsNameMatchDRFontName(ByteStringView bsPsName,
bool bBold,
bool bItalic,
const ByteString& bsDRFontName,
bool bStrictMatch) { … }
}
CFGAS_PDFFontMgr::CFGAS_PDFFontMgr(const CPDF_Document* pDoc) : … { … }
CFGAS_PDFFontMgr::~CFGAS_PDFFontMgr() = default;
RetainPtr<CFGAS_GEFont> CFGAS_PDFFontMgr::FindFont(const ByteString& strPsName,
bool bBold,
bool bItalic,
bool bStrictMatch) { … }
RetainPtr<CFGAS_GEFont> CFGAS_PDFFontMgr::GetFont(
const WideString& wsFontFamily,
uint32_t dwFontStyles,
bool bStrictMatch) { … }