#include "core/fpdfapi/font/cpdf_fontencoding.h"
#include <iterator>
#include <optional>
#include "constants/font_encodings.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/fx_fontencoding.h"
namespace {
constexpr std::array<uint16_t, CPDF_FontEncoding::kEncodingTableSize>
kMSSymbolEncoding = …;
constexpr std::array<uint16_t, CPDF_FontEncoding::kEncodingTableSize>
kStandardEncoding = …;
constexpr std::array<uint16_t, CPDF_FontEncoding::kEncodingTableSize>
kMacRomanEncoding = …;
const uint16_t kAdobeWinAnsiEncoding[CPDF_FontEncoding::kEncodingTableSize] = …;
const uint16_t kMacExpertEncoding[CPDF_FontEncoding::kEncodingTableSize] = …;
const uint16_t kAdobeSymbolEncoding[CPDF_FontEncoding::kEncodingTableSize] = …;
const uint16_t kZapfEncoding[CPDF_FontEncoding::kEncodingTableSize] = …;
constexpr size_t kEncodingTableFirstChar = …;
constexpr size_t kEncodingNamesTableSize = …;
constexpr size_t kPDFDocEncodingTableFirstChar = …;
constexpr size_t kPDFDocEncodingNamesTableSize = …;
constexpr std::array<const char*, kEncodingNamesTableSize>
kStandardEncodingNames = …;
constexpr std::array<const char*, kEncodingNamesTableSize>
kAdobeWinAnsiEncodingNames = …;
constexpr std::array<const char*, kEncodingNamesTableSize>
kMacRomanEncodingNames = …;
constexpr std::array<const char*, kEncodingNamesTableSize>
kMacExpertEncodingNames = …;
constexpr std::array<const char*, kPDFDocEncodingNamesTableSize>
kPDFDocEncodingNames = …;
constexpr std::array<const char*, kEncodingNamesTableSize>
kAdobeSymbolEncodingNames = …;
constexpr std::array<const char*, kEncodingNamesTableSize> kZapfEncodingNames = …;
uint32_t PDF_FindCode(pdfium::span<const uint16_t> pCodes, uint16_t unicode) { … }
}
int CPDF_FontEncoding::CharCodeFromUnicode(wchar_t unicode) const { … }
CPDF_FontEncoding::CPDF_FontEncoding(FontEncoding predefined_encoding) { … }
bool CPDF_FontEncoding::IsIdentical(const CPDF_FontEncoding* pAnother) const { … }
RetainPtr<CPDF_Object> CPDF_FontEncoding::Realize(
WeakPtr<ByteStringPool> pPool) const { … }
uint32_t CharCodeFromUnicodeForEncoding(fxge::FontEncoding encoding,
wchar_t unicode) { … }
wchar_t UnicodeFromAppleRomanCharCode(uint8_t charcode) { … }
pdfium::span<const uint16_t> UnicodesForPredefinedCharSet(
FontEncoding encoding) { … }
const char* CharNameFromPredefinedCharSet(FontEncoding encoding,
uint8_t charcode) { … }