| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef CORE_FXGE_ANDROID_FX_ANDROID_FONT_H_ | |
| 8 #define CORE_FXGE_ANDROID_FX_ANDROID_FONT_H_ | |
| 9 | |
| 10 #include "core/fxcrt/fx_system.h" | |
| 11 | |
| 12 #if _FX_OS_ == _FX_ANDROID_ | |
| 13 | |
| 14 #include "core/fxge/cfx_fontmapper.h" | |
| 15 #include "core/fxge/fx_font.h" | |
| 16 #include "core/fxge/ifx_systemfontinfo.h" | |
| 17 | |
| 18 class CFPF_SkiaFontMgr; | |
| 19 | |
| 20 class CFX_AndroidFontInfo : public IFX_SystemFontInfo { | |
| 21 public: | |
| 22 CFX_AndroidFontInfo(); | |
| 23 ~CFX_AndroidFontInfo() override; | |
| 24 | |
| 25 FX_BOOL Init(CFPF_SkiaFontMgr* pFontMgr); | |
| 26 | |
| 27 // IFX_SystemFontInfo: | |
| 28 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; | |
| 29 void* MapFont(int weight, | |
| 30 FX_BOOL bItalic, | |
| 31 int charset, | |
| 32 int pitch_family, | |
| 33 const FX_CHAR* face, | |
| 34 int& bExact) override; | |
| 35 void* GetFont(const FX_CHAR* face) override; | |
| 36 uint32_t GetFontData(void* hFont, | |
| 37 uint32_t table, | |
| 38 uint8_t* buffer, | |
| 39 uint32_t size) override; | |
| 40 FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override; | |
| 41 FX_BOOL GetFontCharset(void* hFont, int& charset) override; | |
| 42 void DeleteFont(void* hFont) override; | |
| 43 | |
| 44 protected: | |
| 45 CFPF_SkiaFontMgr* m_pFontMgr; | |
| 46 }; | |
| 47 | |
| 48 #endif // _FX_OS_ == _FX_ANDROID_ | |
| 49 | |
| 50 #endif // CORE_FXGE_ANDROID_FX_ANDROID_FONT_H_ | |
| OLD | NEW |