| 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 30 matching lines...) Expand all Loading... |
| 41 std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; | 41 std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; |
| 42 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; | 42 CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class CFX_StockFontArray { | 45 class CFX_StockFontArray { |
| 46 public: | 46 public: |
| 47 CFX_StockFontArray(); | 47 CFX_StockFontArray(); |
| 48 ~CFX_StockFontArray(); | 48 ~CFX_StockFontArray(); |
| 49 | 49 |
| 50 // Takes ownership of |pFont|. | 50 // Takes ownership of |pFont|. |
| 51 void SetFont(int index, CPDF_Font* pFont); | 51 void SetFont(uint32_t index, CPDF_Font* pFont); |
| 52 CPDF_Font* GetFont(int index) const; | 52 CPDF_Font* GetFont(uint32_t index) const; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 std::unique_ptr<CPDF_Font> m_StockFonts[14]; | 55 std::unique_ptr<CPDF_Font> m_StockFonts[14]; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class CPDF_FontGlobals { | 58 class CPDF_FontGlobals { |
| 59 public: | 59 public: |
| 60 CPDF_FontGlobals(); | 60 CPDF_FontGlobals(); |
| 61 ~CPDF_FontGlobals(); | 61 ~CPDF_FontGlobals(); |
| 62 | 62 |
| 63 void Clear(CPDF_Document* pDoc); | 63 void Clear(CPDF_Document* pDoc); |
| 64 CPDF_Font* Find(CPDF_Document* pDoc, int index); | 64 CPDF_Font* Find(CPDF_Document* pDoc, uint32_t index); |
| 65 | 65 |
| 66 // Takes ownership of |pFont|. | 66 // Takes ownership of |pFont|. |
| 67 void Set(CPDF_Document* key, int index, CPDF_Font* pFont); | 67 void Set(CPDF_Document* key, uint32_t index, CPDF_Font* pFont); |
| 68 | 68 |
| 69 CPDF_CMapManager m_CMapManager; | 69 CPDF_CMapManager m_CMapManager; |
| 70 struct { | 70 struct { |
| 71 const struct FXCMAP_CMap* m_pMapList; | 71 const struct FXCMAP_CMap* m_pMapList; |
| 72 int m_Count; | 72 uint32_t m_Count; |
| 73 } m_EmbeddedCharsets[CIDSET_NUM_SETS]; | 73 } m_EmbeddedCharsets[CIDSET_NUM_SETS]; |
| 74 struct { | 74 struct { |
| 75 const uint16_t* m_pMap; | 75 const uint16_t* m_pMap; |
| 76 int m_Count; | 76 uint32_t m_Count; |
| 77 } m_EmbeddedToUnicodes[CIDSET_NUM_SETS]; | 77 } m_EmbeddedToUnicodes[CIDSET_NUM_SETS]; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 std::map<CPDF_Document*, std::unique_ptr<CFX_StockFontArray>> m_StockMap; | 80 std::map<CPDF_Document*, std::unique_ptr<CFX_StockFontArray>> m_StockMap; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 struct CMap_CodeRange { | 83 struct CMap_CodeRange { |
| 84 int m_CharSize; | 84 int m_CharSize; |
| 85 uint8_t m_Lower[4]; | 85 uint8_t m_Lower[4]; |
| 86 uint8_t m_Upper[4]; | 86 uint8_t m_Upper[4]; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 static uint32_t StringToCode(const CFX_ByteStringC& str); | 200 static uint32_t StringToCode(const CFX_ByteStringC& str); |
| 201 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 201 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, | 204 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, |
| 205 const uint16_t*& pMap, | 205 const uint16_t*& pMap, |
| 206 uint32_t& count); | 206 uint32_t& count); |
| 207 | 207 |
| 208 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 208 #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ |
| OLD | NEW |