7#ifndef CORE_FPDFDOC_CPDF_BAFONTMAP_H_
8#define CORE_FPDFDOC_CPDF_BAFONTMAP_H_
13#include "core/fpdfdoc/ipvt_fontmap.h"
14#include "core/fxcrt/fx_codepage.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/unowned_ptr.h"
27 const ByteString& sAPType);
35 int32_t nFontIndex)
override;
57 ByteString* sFontAlias,
61 const ByteString& sAlias);
63 bool KnowWord(int32_t nFontIndex, uint16_t word);
65 int32_t GetFontIndex(
const ByteString& sFontName,
69 const ByteString& sFontAlias,
72 int32_t FindFont(
const ByteString& sFontName,
FX_Charset nCharset);
73 ByteString GetNativeFontName(
FX_Charset nCharset);
74 ByteString GetCachedNativeFontName(
FX_Charset nCharset);
80 std::vector<std::unique_ptr<Data>> m_Data;
81 std::vector<std::unique_ptr<Native>> m_NativeFont;
83 RetainPtr<CPDF_Dictionary>
const m_pAnnotDict;
85 ByteString m_sDefaultFontName;
86 const ByteString m_sAPType;
bool HasLocalizedFont(ByteStringView name) const
bool HasInstalledFont(ByteStringView name) const
void LoadInstalledFonts()
static bool IsStandardFontName(const ByteString &name)
CFX_FontMapper * GetBuiltinMapper() const
static ByteString GetDefaultFontNameByCharset(FX_Charset nCharset)
static const char kDefaultAnsiFontName[]
static const char kUniversalDefaultFontName[]
static FX_Charset GetCharSetFromUnicode(uint16_t word)
static CFX_GEModule * Get()
CFX_FontMgr * GetFontMgr() const
int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) override
FX_Charset CharSetFromUnicode(uint16_t word, FX_Charset nOldCharset) override
RetainPtr< CPDF_Font > GetPDFFont(int32_t nFontIndex) override
~CPDF_BAFontMap() override
static FX_Charset GetNativeCharset()
CPDF_BAFontMap(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pAnnotDict, const ByteString &sAPType)
int32_t GetWordFontIndex(uint16_t word, FX_Charset nCharset, int32_t nFontIndex) override
ByteString GetPDFFontAlias(int32_t nFontIndex) override
CPDF_DefaultAppearance(const ByteString &csDA)
static CPDF_DocPageData * FromDocument(const CPDF_Document *pDoc)
CPDF_FontEncoding(FontEncoding predefined_encoding)
static ByteString Format(const char *pFormat,...)
ByteString & operator+=(const ByteString &str)
bool operator==(const char *ptr) const
ByteString & operator=(ByteString &&that) noexcept
FX_CodePage FX_GetCodePageFromCharset(FX_Charset charset)
FX_Charset FX_GetCharsetFromCodePage(FX_CodePage codepage)