| 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 28 matching lines...) Expand all  Loading... | 
| 39 | 39 | 
| 40   std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; | 40   std::map<CFX_ByteString, CPDF_CMap*> m_CMaps; | 
| 41   CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; | 41   CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6]; | 
| 42 }; | 42 }; | 
| 43 | 43 | 
| 44 class CFX_StockFontArray { | 44 class CFX_StockFontArray { | 
| 45  public: | 45  public: | 
| 46   CFX_StockFontArray(); | 46   CFX_StockFontArray(); | 
| 47   ~CFX_StockFontArray(); | 47   ~CFX_StockFontArray(); | 
| 48 | 48 | 
| 49   // Takes ownership of |pFont|. | 49   // Takes ownership of |pFont|, returns unowned pointer to it. | 
| 50   void SetFont(uint32_t index, CPDF_Font* pFont); | 50   CPDF_Font* SetFont(uint32_t index, std::unique_ptr<CPDF_Font> pFont); | 
| 51   CPDF_Font* GetFont(uint32_t index) const; | 51   CPDF_Font* GetFont(uint32_t index) const; | 
| 52 | 52 | 
| 53  private: | 53  private: | 
| 54   std::unique_ptr<CPDF_Font> m_StockFonts[14]; | 54   std::unique_ptr<CPDF_Font> m_StockFonts[14]; | 
| 55 }; | 55 }; | 
| 56 | 56 | 
| 57 class CPDF_FontGlobals { | 57 class CPDF_FontGlobals { | 
| 58  public: | 58  public: | 
| 59   CPDF_FontGlobals(); | 59   CPDF_FontGlobals(); | 
| 60   ~CPDF_FontGlobals(); | 60   ~CPDF_FontGlobals(); | 
| 61 | 61 | 
| 62   void Clear(CPDF_Document* pDoc); | 62   void Clear(CPDF_Document* pDoc); | 
| 63   CPDF_Font* Find(CPDF_Document* pDoc, uint32_t index); | 63   CPDF_Font* Find(CPDF_Document* pDoc, uint32_t index); | 
| 64 | 64 | 
| 65   // Takes ownership of |pFont|. | 65   // Takes ownership of |pFont|, returns unowned pointer to it. | 
| 66   void Set(CPDF_Document* key, uint32_t index, CPDF_Font* pFont); | 66   CPDF_Font* Set(CPDF_Document* key, | 
|  | 67                  uint32_t index, | 
|  | 68                  std::unique_ptr<CPDF_Font> pFont); | 
| 67 | 69 | 
| 68   CPDF_CMapManager m_CMapManager; | 70   CPDF_CMapManager m_CMapManager; | 
| 69   struct { | 71   struct { | 
| 70     const struct FXCMAP_CMap* m_pMapList; | 72     const struct FXCMAP_CMap* m_pMapList; | 
| 71     uint32_t m_Count; | 73     uint32_t m_Count; | 
| 72   } m_EmbeddedCharsets[CIDSET_NUM_SETS]; | 74   } m_EmbeddedCharsets[CIDSET_NUM_SETS]; | 
| 73   struct { | 75   struct { | 
| 74     const uint16_t* m_pMap; | 76     const uint16_t* m_pMap; | 
| 75     uint32_t m_Count; | 77     uint32_t m_Count; | 
| 76   } m_EmbeddedToUnicodes[CIDSET_NUM_SETS]; | 78   } m_EmbeddedToUnicodes[CIDSET_NUM_SETS]; | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 195 | 197 | 
| 196   static uint32_t StringToCode(const CFX_ByteStringC& str); | 198   static uint32_t StringToCode(const CFX_ByteStringC& str); | 
| 197   static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 199   static CFX_WideString StringToWideString(const CFX_ByteStringC& str); | 
| 198 | 200 | 
| 199   std::map<uint32_t, uint32_t> m_Map; | 201   std::map<uint32_t, uint32_t> m_Map; | 
| 200   CPDF_CID2UnicodeMap* m_pBaseMap; | 202   CPDF_CID2UnicodeMap* m_pBaseMap; | 
| 201   CFX_WideTextBuf m_MultiCharBuf; | 203   CFX_WideTextBuf m_MultiCharBuf; | 
| 202 }; | 204 }; | 
| 203 | 205 | 
| 204 #endif  // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 206 #endif  // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ | 
| OLD | NEW | 
|---|