Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: core/fpdfapi/fpdf_font/font_int.h

Issue 1817283002: Make predefined character table slightly smaller. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/font_int.h
diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h
index c9981387e6ac97bbbdc67c0faf2f57c5fc1769d7..bb209d8c169297307a840cdaa701050f6e768e84 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;
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698