| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ | 7 #ifndef CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ |
| 8 #define CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ | 8 #define CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 CFPF_SkiaFontMgr(); | 24 CFPF_SkiaFontMgr(); |
| 25 ~CFPF_SkiaFontMgr(); | 25 ~CFPF_SkiaFontMgr(); |
| 26 | 26 |
| 27 void LoadSystemFonts(); | 27 void LoadSystemFonts(); |
| 28 CFPF_SkiaFont* CreateFont(const CFX_ByteStringC& bsFamilyname, | 28 CFPF_SkiaFont* CreateFont(const CFX_ByteStringC& bsFamilyname, |
| 29 uint8_t uCharset, | 29 uint8_t uCharset, |
| 30 uint32_t dwStyle, | 30 uint32_t dwStyle, |
| 31 uint32_t dwMatch = 0); | 31 uint32_t dwMatch = 0); |
| 32 | 32 |
| 33 bool InitFTLibrary(); | 33 bool InitFTLibrary(); |
| 34 FXFT_Face GetFontFace(IFX_SeekableReadStream* pFileRead, | 34 FXFT_Face GetFontFace(const CFX_RetainPtr<IFX_SeekableReadStream>& pFileRead, |
| 35 int32_t iFaceIndex = 0); | 35 int32_t iFaceIndex = 0); |
| 36 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0); | 36 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0); |
| 37 FXFT_Face GetFontFace(const uint8_t* pBuffer, | 37 FXFT_Face GetFontFace(const uint8_t* pBuffer, |
| 38 size_t szBuffer, | 38 size_t szBuffer, |
| 39 int32_t iFaceIndex = 0); | 39 int32_t iFaceIndex = 0); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 void ScanPath(const CFX_ByteString& path); | 42 void ScanPath(const CFX_ByteString& path); |
| 43 void ScanFile(const CFX_ByteString& file); | 43 void ScanFile(const CFX_ByteString& file); |
| 44 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc); | 44 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc); |
| 45 | 45 |
| 46 bool m_bLoaded; | 46 bool m_bLoaded; |
| 47 FXFT_Library m_FTLibrary; | 47 FXFT_Library m_FTLibrary; |
| 48 std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces; | 48 std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces; |
| 49 std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts; | 49 std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 #endif // CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ | 52 #endif // CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_ |
| OLD | NEW |