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 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
7 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
8 | 9 |
| 10 #include <map> |
| 11 |
| 12 #include "../../../include/fxcrt/fx_basic.h" |
| 13 #include "../../../include/fpdfapi/fpdf_resource.h" |
| 14 |
| 15 class CPDF_CID2UnicodeMap; |
| 16 class CPDF_CMap; |
| 17 class CPDF_Font; |
| 18 class CPDF_Stream; |
| 19 |
9 typedef void* FXFT_Library; | 20 typedef void* FXFT_Library; |
| 21 |
10 class CPDF_CMapManager { | 22 class CPDF_CMapManager { |
11 public: | 23 public: |
12 CPDF_CMapManager(); | 24 CPDF_CMapManager(); |
13 ~CPDF_CMapManager(); | 25 ~CPDF_CMapManager(); |
14 void* GetPackage(FX_BOOL bPrompt); | 26 void* GetPackage(FX_BOOL bPrompt); |
15 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt); | 27 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt); |
16 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt); | 28 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt); |
17 void ReloadAll(); | 29 void ReloadAll(); |
18 | 30 |
19 private: | 31 private: |
20 CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt); | 32 CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt); |
21 CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(int charset, FX_BOOL bPrompt); | 33 CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(int charset, FX_BOOL bPrompt); |
22 void DropAll(FX_BOOL bReload); | 34 |
23 FX_BOOL m_bPrompted; | 35 FX_BOOL m_bPrompted; |
24 CFX_MapByteStringToPtr m_CMaps; | 36 std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; |
25 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; | 37 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; |
26 }; | 38 }; |
27 class CPDF_FontGlobals { | 39 class CPDF_FontGlobals { |
28 public: | 40 public: |
29 CPDF_FontGlobals(); | 41 CPDF_FontGlobals(); |
30 ~CPDF_FontGlobals(); | 42 ~CPDF_FontGlobals(); |
31 void ClearAll(); | 43 void ClearAll(); |
32 void Clear(void* key); | 44 void Clear(void* key); |
33 CPDF_Font* Find(void* key, int index); | 45 CPDF_Font* Find(void* key, int index); |
34 void Set(void* key, int index, CPDF_Font* pFont); | 46 void Set(void* key, int index, CPDF_Font* pFont); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 CPDF_CID2UnicodeMap* m_pBaseMap; | 176 CPDF_CID2UnicodeMap* m_pBaseMap; |
165 CFX_WideTextBuf m_MultiCharBuf; | 177 CFX_WideTextBuf m_MultiCharBuf; |
166 }; | 178 }; |
167 class CPDF_FontCharMap : public CFX_CharMap { | 179 class CPDF_FontCharMap : public CFX_CharMap { |
168 public: | 180 public: |
169 CPDF_FontCharMap(CPDF_Font* pFont); | 181 CPDF_FontCharMap(CPDF_Font* pFont); |
170 CPDF_Font* m_pFont; | 182 CPDF_Font* m_pFont; |
171 }; | 183 }; |
172 | 184 |
173 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 185 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
OLD | NEW |