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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 MixedFourBytes | 135 MixedFourBytes |
136 }; | 136 }; |
137 | 137 |
138 CPDF_CMap(); | 138 CPDF_CMap(); |
139 ~CPDF_CMap(); | 139 ~CPDF_CMap(); |
140 | 140 |
141 FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, | 141 FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, |
142 const FX_CHAR* name, | 142 const FX_CHAR* name, |
143 FX_BOOL bPromptCJK); | 143 FX_BOOL bPromptCJK); |
144 FX_BOOL LoadEmbedded(const uint8_t* pData, uint32_t dwSize); | 144 FX_BOOL LoadEmbedded(const uint8_t* pData, uint32_t dwSize); |
145 void Release(); | |
146 | 145 |
147 FX_BOOL IsLoaded() const; | 146 FX_BOOL IsLoaded() const; |
148 FX_BOOL IsVertWriting() const; | 147 FX_BOOL IsVertWriting() const; |
149 uint16_t CIDFromCharCode(uint32_t charcode) const; | 148 uint16_t CIDFromCharCode(uint32_t charcode) const; |
150 uint32_t CharCodeFromCID(uint16_t CID) const; | |
151 int GetCharSize(uint32_t charcode) const; | 149 int GetCharSize(uint32_t charcode) const; |
152 uint32_t GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; | 150 uint32_t GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; |
153 int CountChar(const FX_CHAR* pString, int size) const; | 151 int CountChar(const FX_CHAR* pString, int size) const; |
154 int AppendChar(FX_CHAR* str, uint32_t charcode) const; | 152 int AppendChar(FX_CHAR* str, uint32_t charcode) const; |
155 | 153 |
156 protected: | 154 private: |
157 friend class CPDF_CMapParser; | 155 friend class CPDF_CMapParser; |
158 friend class CPDF_CMapManager; | |
159 friend class CPDF_CIDFont; | 156 friend class CPDF_CIDFont; |
160 | 157 |
161 CFX_ByteString m_PredefinedCMap; | 158 CFX_ByteString m_PredefinedCMap; |
162 FX_BOOL m_bVertical; | 159 FX_BOOL m_bVertical; |
163 CIDSet m_Charset; | 160 CIDSet m_Charset; |
164 int m_Coding; | 161 int m_Coding; |
165 CodingScheme m_CodingScheme; | 162 CodingScheme m_CodingScheme; |
166 int m_nCodeRanges; | 163 int m_nCodeRanges; |
167 uint8_t* m_pLeadingBytes; | 164 uint8_t* m_pLeadingBytes; |
168 uint16_t* m_pMapping; | 165 uint16_t* m_pMapping; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 201 |
205 private: | 202 private: |
206 friend class fpdf_font_StringToCode_Test; | 203 friend class fpdf_font_StringToCode_Test; |
207 friend class fpdf_font_StringToWideString_Test; | 204 friend class fpdf_font_StringToWideString_Test; |
208 | 205 |
209 static uint32_t StringToCode(const CFX_ByteStringC& str); | 206 static uint32_t StringToCode(const CFX_ByteStringC& str); |
210 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 207 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); |
211 }; | 208 }; |
212 | 209 |
213 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 210 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
OLD | NEW |