1 // Copyright 2016 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_CFX_ANDROIDFONTINFO_H_ 8 #define CORE_FXGE_ANDROID_CFX_ANDROIDFONTINFO_H_ 9 10 #include "core/fxcrt/fx_system.h" 11 #include "core/fxcrt/unowned_ptr.h" 12 #include "core/fxge/cfx_fontmapper.h" 13 #include "core/fxge/ifx_systemfontinfo.h" 14 15 class CFPF_SkiaFontMgr; 16 17 class CFX_AndroidFontInfo : public IFX_SystemFontInfo { 18 public: 19 CFX_AndroidFontInfo(); 20 ~CFX_AndroidFontInfo() override; 21 22 bool Init(CFPF_SkiaFontMgr* pFontMgr); 23 24 // IFX_SystemFontInfo: 25 bool EnumFontList(CFX_FontMapper* pMapper) override; 26 void* MapFont(int weight, 27 bool bItalic, 28 int charset, 29 int pitch_family, 30 const char* face) override; 31 void* GetFont(const char* face) override; 32 uint32_t GetFontData(void* hFont, 33 uint32_t table, 34 uint8_t* buffer, 35 uint32_t size) override; 36 bool GetFaceName(void* hFont, ByteString* name) override; 37 bool GetFontCharset(void* hFont, int* charset) override; 38 void DeleteFont(void* hFont) override; 39 40 protected: 41 UnownedPtr<CFPF_SkiaFontMgr> m_pFontMgr; 42 }; 43 44 #endif // CORE_FXGE_ANDROID_CFX_ANDROIDFONTINFO_H_ 45