| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| 8 #define CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 8 #define CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 class CPDF_CMap { | 126 class CPDF_CMap { |
| 127 public: | 127 public: |
| 128 enum CodingScheme : uint8_t { | 128 enum CodingScheme : uint8_t { |
| 129 OneByte, | 129 OneByte, |
| 130 TwoBytes, | 130 TwoBytes, |
| 131 MixedTwoBytes, | 131 MixedTwoBytes, |
| 132 MixedFourBytes | 132 MixedFourBytes |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 CPDF_CMap(); | 135 CPDF_CMap(); |
| 136 ~CPDF_CMap(); |
| 137 |
| 136 FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, | 138 FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, |
| 137 const FX_CHAR* name, | 139 const FX_CHAR* name, |
| 138 FX_BOOL bPromptCJK); | 140 FX_BOOL bPromptCJK); |
| 139 FX_BOOL LoadEmbedded(const uint8_t* pData, uint32_t dwSize); | 141 FX_BOOL LoadEmbedded(const uint8_t* pData, uint32_t dwSize); |
| 140 void Release(); | 142 void Release(); |
| 141 FX_BOOL IsLoaded() const { return m_bLoaded; } | 143 FX_BOOL IsLoaded() const { return m_bLoaded; } |
| 142 FX_BOOL IsVertWriting() const { return m_bVertical; } | 144 FX_BOOL IsVertWriting() const { return m_bVertical; } |
| 143 uint16_t CIDFromCharCode(uint32_t charcode) const; | 145 uint16_t CIDFromCharCode(uint32_t charcode) const; |
| 144 uint32_t CharCodeFromCID(uint16_t CID) const; | 146 uint32_t CharCodeFromCID(uint16_t CID) const; |
| 145 int GetCharSize(uint32_t charcode) const; | 147 int GetCharSize(uint32_t charcode) const; |
| 146 uint32_t GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; | 148 uint32_t GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; |
| 147 int CountChar(const FX_CHAR* pString, int size) const; | 149 int CountChar(const FX_CHAR* pString, int size) const; |
| 148 int AppendChar(FX_CHAR* str, uint32_t charcode) const; | 150 int AppendChar(FX_CHAR* str, uint32_t charcode) const; |
| 149 | 151 |
| 150 protected: | 152 protected: |
| 151 ~CPDF_CMap(); | |
| 152 friend class CPDF_CMapParser; | 153 friend class CPDF_CMapParser; |
| 153 friend class CPDF_CMapManager; | 154 friend class CPDF_CMapManager; |
| 154 friend class CPDF_CIDFont; | 155 friend class CPDF_CIDFont; |
| 155 | 156 |
| 156 CFX_ByteString m_PredefinedCMap; | 157 CFX_ByteString m_PredefinedCMap; |
| 157 FX_BOOL m_bVertical; | 158 FX_BOOL m_bVertical; |
| 158 CIDSet m_Charset; | 159 CIDSet m_Charset; |
| 159 int m_Coding; | 160 int m_Coding; |
| 160 CodingScheme m_CodingScheme; | 161 CodingScheme m_CodingScheme; |
| 161 int m_nCodeRanges; | 162 int m_nCodeRanges; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 200 |
| 200 static uint32_t StringToCode(const CFX_ByteStringC& str); | 201 static uint32_t StringToCode(const CFX_ByteStringC& str); |
| 201 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 202 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); |
| 202 }; | 203 }; |
| 203 | 204 |
| 204 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, | 205 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, |
| 205 const uint16_t*& pMap, | 206 const uint16_t*& pMap, |
| 206 uint32_t& count); | 207 uint32_t& count); |
| 207 | 208 |
| 208 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 209 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| OLD | NEW |