| 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 14 matching lines...) Expand all Loading... |
| 25 CIDSet CharsetFromOrdering(const CFX_ByteStringC& ordering); | 25 CIDSet CharsetFromOrdering(const CFX_ByteStringC& ordering); |
| 26 | 26 |
| 27 class CPDF_CMapManager { | 27 class CPDF_CMapManager { |
| 28 public: | 28 public: |
| 29 CPDF_CMapManager(); | 29 CPDF_CMapManager(); |
| 30 ~CPDF_CMapManager(); | 30 ~CPDF_CMapManager(); |
| 31 | 31 |
| 32 void* GetPackage(FX_BOOL bPrompt); | 32 void* GetPackage(FX_BOOL bPrompt); |
| 33 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK); | 33 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK); |
| 34 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK); | 34 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK); |
| 35 void ReloadAll(); | |
| 36 | 35 |
| 37 private: | 36 private: |
| 38 CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK); | 37 CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK); |
| 39 CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK); | 38 CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK); |
| 40 | 39 |
| 41 FX_BOOL m_bPrompted; | |
| 42 std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; | 40 std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; |
| 43 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; | 41 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; |
| 44 }; | 42 }; |
| 45 | 43 |
| 46 class CFX_StockFontArray { | 44 class CFX_StockFontArray { |
| 47 public: | 45 public: |
| 48 CFX_StockFontArray(); | 46 CFX_StockFontArray(); |
| 49 ~CFX_StockFontArray(); | 47 ~CFX_StockFontArray(); |
| 50 | 48 |
| 51 // Takes ownership of |pFont|. | 49 // Takes ownership of |pFont|. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 static uint32_t CMap_GetCode(const CFX_ByteStringC& word); | 100 static uint32_t CMap_GetCode(const CFX_ByteStringC& word); |
| 103 static bool CMap_GetCodeRange(CMap_CodeRange& range, | 101 static bool CMap_GetCodeRange(CMap_CodeRange& range, |
| 104 const CFX_ByteStringC& first, | 102 const CFX_ByteStringC& first, |
| 105 const CFX_ByteStringC& second); | 103 const CFX_ByteStringC& second); |
| 106 | 104 |
| 107 CPDF_CMap* m_pCMap; | 105 CPDF_CMap* m_pCMap; |
| 108 int m_Status; | 106 int m_Status; |
| 109 int m_CodeSeq; | 107 int m_CodeSeq; |
| 110 uint32_t m_CodePoints[4]; | 108 uint32_t m_CodePoints[4]; |
| 111 CFX_ArrayTemplate<CMap_CodeRange> m_CodeRanges; | 109 CFX_ArrayTemplate<CMap_CodeRange> m_CodeRanges; |
| 112 CFX_ByteString m_Registry; | |
| 113 CFX_ByteString m_Ordering; | |
| 114 CFX_ByteString m_Supplement; | |
| 115 CFX_ByteString m_LastWord; | 110 CFX_ByteString m_LastWord; |
| 116 }; | 111 }; |
| 117 | 112 |
| 118 enum CIDCoding : uint8_t { | 113 enum CIDCoding : uint8_t { |
| 119 CIDCODING_UNKNOWN = 0, | 114 CIDCODING_UNKNOWN = 0, |
| 120 CIDCODING_GB, | 115 CIDCODING_GB, |
| 121 CIDCODING_BIG5, | 116 CIDCODING_BIG5, |
| 122 CIDCODING_JIS, | 117 CIDCODING_JIS, |
| 123 CIDCODING_KOREA, | 118 CIDCODING_KOREA, |
| 124 CIDCODING_UCS2, | 119 CIDCODING_UCS2, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 196 |
| 202 private: | 197 private: |
| 203 friend class fpdf_font_StringToCode_Test; | 198 friend class fpdf_font_StringToCode_Test; |
| 204 friend class fpdf_font_StringToWideString_Test; | 199 friend class fpdf_font_StringToWideString_Test; |
| 205 | 200 |
| 206 static uint32_t StringToCode(const CFX_ByteStringC& str); | 201 static uint32_t StringToCode(const CFX_ByteStringC& str); |
| 207 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 202 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); |
| 208 }; | 203 }; |
| 209 | 204 |
| 210 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 205 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| OLD | NEW |