| 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 XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ | 7 #ifndef XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ |
| 8 #define XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ | 8 #define XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 uint16_t wCodePage = 0xFFFF); | 35 uint16_t wCodePage = 0xFFFF); |
| 36 IFX_Font* GetDefaultFont(CXFA_FFDoc* hDoc, | 36 IFX_Font* GetDefaultFont(CXFA_FFDoc* hDoc, |
| 37 const CFX_WideStringC& wsFontFamily, | 37 const CFX_WideStringC& wsFontFamily, |
| 38 uint32_t dwFontStyles, | 38 uint32_t dwFontStyles, |
| 39 uint16_t wCodePage = 0xFFFF); | 39 uint16_t wCodePage = 0xFFFF); |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 CFX_PtrArray m_CacheFonts; | 42 CFX_PtrArray m_CacheFonts; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class CXFA_PDFFontMgr : public IFX_FontProvider { | 45 class CXFA_PDFFontMgr { |
| 46 public: | 46 public: |
| 47 CXFA_PDFFontMgr(CXFA_FFDoc* pDoc); | 47 CXFA_PDFFontMgr(CXFA_FFDoc* pDoc); |
| 48 ~CXFA_PDFFontMgr(); | 48 ~CXFA_PDFFontMgr(); |
| 49 |
| 49 IFX_Font* GetFont(const CFX_WideStringC& wsFontFamily, | 50 IFX_Font* GetFont(const CFX_WideStringC& wsFontFamily, |
| 50 uint32_t dwFontStyles, | 51 uint32_t dwFontStyles, |
| 51 CPDF_Font** pPDFFont, | 52 CPDF_Font** pPDFFont, |
| 52 FX_BOOL bStrictMatch = TRUE); | 53 FX_BOOL bStrictMatch = TRUE); |
| 53 FX_BOOL GetCharWidth(IFX_Font* pFont, | 54 FX_BOOL GetCharWidth(IFX_Font* pFont, |
| 54 FX_WCHAR wUnicode, | 55 FX_WCHAR wUnicode, |
| 55 int32_t& iWidth, | 56 int32_t& iWidth, |
| 56 FX_BOOL bCharCode); | 57 FX_BOOL bCharCode); |
| 57 CFX_MapPtrToPtr m_FDE2PDFFont; | 58 CFX_MapPtrToPtr m_FDE2PDFFont; |
| 58 | 59 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 91 |
| 91 protected: | 92 protected: |
| 92 void DelAllMgrMap(); | 93 void DelAllMgrMap(); |
| 93 | 94 |
| 94 CFX_MapPtrToPtr m_PDFFontMgrArray; | 95 CFX_MapPtrToPtr m_PDFFontMgrArray; |
| 95 CXFA_DefFontMgr* m_pDefFontMgr; | 96 CXFA_DefFontMgr* m_pDefFontMgr; |
| 96 std::map<CFX_ByteString, IFX_Font*> m_FontMap; | 97 std::map<CFX_ByteString, IFX_Font*> m_FontMap; |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 #endif // XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ | 100 #endif // XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ |
| OLD | NEW |