Chromium Code Reviews| 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_FGAS_FONT_FGAS_GEFONT_H_ | 7 #ifndef XFA_FGAS_FONT_FGAS_GEFONT_H_ |
| 8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_ | 8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "core/fxcrt/include/fx_memory.h" | 12 #include "core/fxcrt/include/fx_memory.h" |
| 13 #include "xfa/fgas/crt/fgas_utils.h" | 13 #include "xfa/fgas/crt/fgas_utils.h" |
| 14 #include "xfa/fgas/font/fgas_font.h" | 14 #include "xfa/fgas/font/fgas_font.h" |
| 15 | 15 |
| 16 #define FXFONT_SUBST_ITALIC 0x02 | 16 #define FXFONT_SUBST_ITALIC 0x02 |
| 17 | 17 |
| 18 class CXFA_PDFFontMgr; | 18 class CXFA_PDFFontMgr; |
| 19 class CFX_UnicodeEncoding; | |
|
dsinclair
2016/08/18 15:14:52
nit: sorted order.
npm
2016/08/18 17:36:41
Done.
| |
| 19 | 20 |
| 20 class CFGAS_GEFont { | 21 class CFGAS_GEFont { |
| 21 public: | 22 public: |
| 22 static CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily, | 23 static CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily, |
| 23 uint32_t dwFontStyles, | 24 uint32_t dwFontStyles, |
| 24 uint16_t wCodePage, | 25 uint16_t wCodePage, |
| 25 IFGAS_FontMgr* pFontMgr); | 26 IFGAS_FontMgr* pFontMgr); |
| 26 static CFGAS_GEFont* LoadFont(CFX_Font* pExtFont, IFGAS_FontMgr* pFontMgr); | 27 static CFGAS_GEFont* LoadFont(CFX_Font* pExtFont, IFGAS_FontMgr* pFontMgr); |
| 27 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 28 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 28 static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, | 29 static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding; | 102 std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding; |
| 102 std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap; | 103 std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap; |
| 103 std::unique_ptr<CFX_MassArrayTemplate<CFX_Rect>> m_pRectArray; | 104 std::unique_ptr<CFX_MassArrayTemplate<CFX_Rect>> m_pRectArray; |
| 104 std::unique_ptr<CFX_MapPtrToPtr> m_pBBoxMap; | 105 std::unique_ptr<CFX_MapPtrToPtr> m_pBBoxMap; |
| 105 CXFA_PDFFontMgr* m_pProvider; // not owned. | 106 CXFA_PDFFontMgr* m_pProvider; // not owned. |
| 106 CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts; | 107 CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts; |
| 107 std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper; | 108 std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper; |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_ | 111 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_ |
| OLD | NEW |