diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:52:56 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:52:56 -0700 |
commit | d074e9787fe5f21d49269a504969cfcf4eec016b (patch) | |
tree | 8384a35e7cb251df4018c66c98716f41c97002fd /core/fpdfapi/fpdf_font/font_int.h | |
parent | 62a70f90c49cf7714c960186eb063ad55333e6f3 (diff) | |
download | pdfium-d074e9787fe5f21d49269a504969cfcf4eec016b.tar.xz |
Make predefined character table slightly smaller.
Add a few missing consts and remove a few extra externs.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1817283002 .
Diffstat (limited to 'core/fpdfapi/fpdf_font/font_int.h')
-rw-r--r-- | core/fpdfapi/fpdf_font/font_int.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h index c9981387e6..bb209d8c16 100644 --- a/core/fpdfapi/fpdf_font/font_int.h +++ b/core/fpdfapi/fpdf_font/font_int.h @@ -110,16 +110,27 @@ class CPDF_CMapParser { CFX_ByteString m_Registry, m_Ordering, m_Supplement; CFX_ByteString m_LastWord; }; -#define CIDCODING_UNKNOWN 0 -#define CIDCODING_GB 1 -#define CIDCODING_BIG5 2 -#define CIDCODING_JIS 3 -#define CIDCODING_KOREA 4 -#define CIDCODING_UCS2 5 -#define CIDCODING_CID 6 -#define CIDCODING_UTF16 7 + +enum CIDCoding : uint8_t { + CIDCODING_UNKNOWN = 0, + CIDCODING_GB, + CIDCODING_BIG5, + CIDCODING_JIS, + CIDCODING_KOREA, + CIDCODING_UCS2, + CIDCODING_CID, + CIDCODING_UTF16, +}; + class CPDF_CMap { public: + enum CodingScheme : uint8_t { + OneByte, + TwoBytes, + MixedTwoBytes, + MixedFourBytes + }; + CPDF_CMap(); FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, const FX_CHAR* name, @@ -134,12 +145,6 @@ class CPDF_CMap { FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; int CountChar(const FX_CHAR* pString, int size) const; int AppendChar(FX_CHAR* str, FX_DWORD charcode) const; - typedef enum { - OneByte, - TwoBytes, - MixedTwoBytes, - MixedFourBytes - } CodingScheme; protected: ~CPDF_CMap(); @@ -147,7 +152,6 @@ class CPDF_CMap { friend class CPDF_CMapManager; friend class CPDF_CIDFont; - protected: CFX_ByteString m_PredefinedCMap; FX_BOOL m_bVertical; CIDSet m_Charset; |