7#ifndef CORE_FPDFAPI_FONT_CPDF_CIDFONT_H_
8#define CORE_FPDFAPI_FONT_CPDF_CIDFONT_H_
15#include "core/fpdfapi/font/cpdf_font.h"
16#include "core/fxcrt/fx_coordinates.h"
17#include "core/fxcrt/fx_string.h"
18#include "core/fxcrt/retain_ptr.h"
19#include "core/fxcrt/unowned_ptr.h"
45 const CPDF_CIDFont*
AsCIDFont()
const override;
50 uint32_t
GetNextChar(ByteStringView pString, size_t* pOffset)
const override;
52 int AppendChar(
char* str, uint32_t charcode)
const override;
66 enum class CIDFontType :
bool {
74 int GetGlyphIndex(uint32_t unicodeb,
bool* pVertGlyph);
75 int GetVerticalGlyph(
int index,
bool* pVertGlyph);
77 wchar_t GetUnicodeFromCharCode(uint32_t charcode)
const;
82 std::unique_ptr<CFX_CTTGSUBTable> m_pTTGSUBTable;
83 CIDFontType m_FontType = CIDFontType::kTrueType;
84 bool m_bCIDIsGID =
false;
85 bool m_bAnsiWidthsFixed =
false;
86 bool m_bAdobeCourierStd =
false;
88 int16_t m_DefaultWidth = 1000;
89 int16_t m_DefaultVY = 880;
90 int16_t m_DefaultW1 = -1000;
91 std::vector<
int> m_WidthList;
92 std::vector<
int> m_VertMetrics;
wchar_t UnicodeFromCID(uint16_t cid) const
CPDF_CID2UnicodeMap(CIDSet charset)
size_t CountChar(ByteStringView pString) const override
uint32_t GetNextChar(ByteStringView pString, size_t *pOffset) const override
bool IsCIDFont() const override
const uint8_t * GetCIDTransform(uint16_t cid) const
bool IsUnicodeCompatible() const override
int AppendChar(char *str, uint32_t charcode) const override
CFX_Point16 GetVertOrigin(uint16_t cid) const
int GetCharWidthF(uint32_t charcode) override
const CPDF_CIDFont * AsCIDFont() const override
uint16_t CIDFromCharCode(uint32_t charcode) const
int GlyphFromCharCode(uint32_t charcode, bool *pVertGlyph) override
int16_t GetVertWidth(uint16_t cid) const
FX_RECT GetCharBBox(uint32_t charcode) override
static float CIDTransformToFloat(uint8_t ch)
bool IsVertWriting() const override
uint32_t CharCodeFromUnicode(wchar_t Unicode) const override
int GetCharSize(uint32_t charcode) const
WideString UnicodeFromCharCode(uint32_t charcode) const override
CPDF_CIDFont * AsCIDFont() override
#define CONSTRUCT_VIA_MAKE_RETAIN