| 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_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 class CPDF_ToUnicodeMap { | 167 class CPDF_ToUnicodeMap { |
| 168 public: | 168 public: |
| 169 void Load(CPDF_Stream* pStream); | 169 void Load(CPDF_Stream* pStream); |
| 170 CFX_WideString Lookup(FX_DWORD charcode); | 170 CFX_WideString Lookup(FX_DWORD charcode); |
| 171 FX_DWORD ReverseLookup(FX_WCHAR unicode); | 171 FX_DWORD ReverseLookup(FX_WCHAR unicode); |
| 172 | 172 |
| 173 protected: | 173 protected: |
| 174 std::map<FX_DWORD, FX_DWORD> m_Map; | 174 std::map<FX_DWORD, FX_DWORD> m_Map; |
| 175 CPDF_CID2UnicodeMap* m_pBaseMap; | 175 CPDF_CID2UnicodeMap* m_pBaseMap; |
| 176 CFX_WideTextBuf m_MultiCharBuf; | 176 CFX_WideTextBuf m_MultiCharBuf; |
| 177 |
| 178 private: |
| 179 friend class fpdf_font_StringToCode_Test; |
| 180 friend class fpdf_font_StringToWideString_Test; |
| 181 |
| 182 static FX_DWORD StringToCode(const CFX_ByteStringC& str); |
| 183 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); |
| 177 }; | 184 }; |
| 178 class CPDF_FontCharMap : public CFX_CharMap { | 185 class CPDF_FontCharMap : public CFX_CharMap { |
| 179 public: | 186 public: |
| 180 CPDF_FontCharMap(CPDF_Font* pFont); | 187 CPDF_FontCharMap(CPDF_Font* pFont); |
| 181 CPDF_Font* m_pFont; | 188 CPDF_Font* m_pFont; |
| 182 }; | 189 }; |
| 183 | 190 |
| 184 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, | 191 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, |
| 185 const FX_WORD*& pMap, | 192 const FX_WORD*& pMap, |
| 186 FX_DWORD& count); | 193 FX_DWORD& count); |
| 187 | 194 |
| 188 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 195 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| OLD | NEW |