| 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_ |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 return FPF_SKIAFONTTYPE_Buffer; | 87 return FPF_SKIAFONTTYPE_Buffer; |
| 88 } | 88 } |
| 89 void* m_pBuffer; | 89 void* m_pBuffer; |
| 90 size_t m_szBuffer; | 90 size_t m_szBuffer; |
| 91 }; | 91 }; |
| 92 class CFPF_SkiaFontMgr : public IFPF_FontMgr | 92 class CFPF_SkiaFontMgr : public IFPF_FontMgr |
| 93 { | 93 { |
| 94 public: | 94 public: |
| 95 CFPF_SkiaFontMgr(); | 95 CFPF_SkiaFontMgr(); |
| 96 virtual ~CFPF_SkiaFontMgr(); | 96 virtual ~CFPF_SkiaFontMgr(); |
| 97 FX_BOOL» » » » » InitFTLibrary(); | 97 bool» » » » » InitFTLibrary(); |
| 98 virtual void LoadSystemFonts(); | 98 virtual void LoadSystemFonts(); |
| 99 virtual void LoadPrivateFont(IFX_FileRead* pFontFile)
; | 99 virtual void LoadPrivateFont(IFX_FileRead* pFontFile)
; |
| 100 virtual void LoadPrivateFont(const CFX_ByteStringC& b
sFileName); | 100 virtual void LoadPrivateFont(const CFX_ByteStringC& b
sFileName); |
| 101 virtual void LoadPrivateFont(void* pBuffer, size_t sz
Buffer); | 101 virtual void LoadPrivateFont(void* pBuffer, size_t sz
Buffer); |
| 102 | 102 |
| 103 virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname,
uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); | 103 virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname,
uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); |
| 104 FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int
32_t iFaceIndex = 0); | 104 FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int
32_t iFaceIndex = 0); |
| 105 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFil
e, int32_t iFaceIndex = 0); | 105 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFil
e, int32_t iFaceIndex = 0); |
| 106 FXFT_Face GetFontFace(const uint8_t* pBuffer, size
_t szBuffer, int32_t iFaceIndex = 0); | 106 FXFT_Face GetFontFace(const uint8_t* pBuffer, size
_t szBuffer, int32_t iFaceIndex = 0); |
| 107 protected: | 107 protected: |
| 108 void ScanPath(const CFX_ByteStringC& path); | 108 void ScanPath(const CFX_ByteStringC& path); |
| 109 void ScanFile(const CFX_ByteStringC& file); | 109 void ScanFile(const CFX_ByteStringC& file); |
| 110 void ReportFace(FXFT_Face face, CFPF_SkiaFont
Descriptor *pFontDesc); | 110 void ReportFace(FXFT_Face face, CFPF_SkiaFont
Descriptor *pFontDesc); |
| 111 void OutputSystemFonts(); | 111 void OutputSystemFonts(); |
| 112 FX_BOOL» » » » m_bLoaded; | 112 bool» » » » m_bLoaded; |
| 113 CFX_PtrArray m_FontFaces; | 113 CFX_PtrArray m_FontFaces; |
| 114 FXFT_Library m_FTLibrary; | 114 FXFT_Library m_FTLibrary; |
| 115 CFX_MapPtrToPtr m_FamilyFonts; | 115 CFX_MapPtrToPtr m_FamilyFonts; |
| 116 }; | 116 }; |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 #endif // CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ | 119 #endif // CORE_SRC_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ |
| OLD | NEW |