| 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_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ | 7 #ifndef CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ |
| 8 #define CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ | 8 #define CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ |
| 9 | 9 |
| 10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
| 11 | 11 |
| 12 #include <map> |
| 13 |
| 12 #include "core/include/fxge/fpf.h" | 14 #include "core/include/fxge/fpf.h" |
| 13 | 15 |
| 14 #define FPF_SKIAFONTTYPE_Unknown 0 | 16 #define FPF_SKIAFONTTYPE_Unknown 0 |
| 15 #define FPF_SKIAFONTTYPE_Path 1 | 17 #define FPF_SKIAFONTTYPE_Path 1 |
| 16 #define FPF_SKIAFONTTYPE_File 2 | 18 #define FPF_SKIAFONTTYPE_File 2 |
| 17 #define FPF_SKIAFONTTYPE_Buffer 3 | 19 #define FPF_SKIAFONTTYPE_Buffer 3 |
| 18 | 20 |
| 21 class CFPF_SkiaFont; |
| 22 |
| 19 class CFPF_SkiaFontDescriptor { | 23 class CFPF_SkiaFontDescriptor { |
| 20 public: | 24 public: |
| 21 CFPF_SkiaFontDescriptor() | 25 CFPF_SkiaFontDescriptor() |
| 22 : m_pFamily(NULL), | 26 : m_pFamily(NULL), |
| 23 m_dwStyle(0), | 27 m_dwStyle(0), |
| 24 m_iFaceIndex(0), | 28 m_iFaceIndex(0), |
| 25 m_dwCharsets(0), | 29 m_dwCharsets(0), |
| 26 m_iGlyphNum(0) {} | 30 m_iGlyphNum(0) {} |
| 27 virtual ~CFPF_SkiaFontDescriptor() { FX_Free(m_pFamily); } | 31 virtual ~CFPF_SkiaFontDescriptor() { FX_Free(m_pFamily); } |
| 28 | 32 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int32_t iFaceIndex = 0); | 107 int32_t iFaceIndex = 0); |
| 104 | 108 |
| 105 protected: | 109 protected: |
| 106 void ScanPath(const CFX_ByteStringC& path); | 110 void ScanPath(const CFX_ByteStringC& path); |
| 107 void ScanFile(const CFX_ByteStringC& file); | 111 void ScanFile(const CFX_ByteStringC& file); |
| 108 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc); | 112 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc); |
| 109 void OutputSystemFonts(); | 113 void OutputSystemFonts(); |
| 110 FX_BOOL m_bLoaded; | 114 FX_BOOL m_bLoaded; |
| 111 CFX_PtrArray m_FontFaces; | 115 CFX_PtrArray m_FontFaces; |
| 112 FXFT_Library m_FTLibrary; | 116 FXFT_Library m_FTLibrary; |
| 113 CFX_MapPtrToPtr m_FamilyFonts; | 117 std::map<FX_DWORD, CFPF_SkiaFont*> m_FamilyFonts; |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 #endif | 120 #endif |
| 117 | 121 |
| 118 #endif // CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ | 122 #endif // CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ |
| OLD | NEW |