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_SRC_FXGE_ANDROID_FX_ANDROID_FONT_H_ 8 #define CORE_SRC_FXGE_ANDROID_FX_ANDROID_FONT_H_ 9 10 #if _FX_OS_ == _FX_ANDROID_ 11 class IFPF_FontMgr; 12 class CFX_AndroidFontInfo : public IFX_SystemFontInfo { 13 public: 14 CFX_AndroidFontInfo(); Release()15 virtual void Release() { delete this; } 16 17 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper); 18 19 virtual void* MapFont(int weight, 20 FX_BOOL bItalic, 21 int charset, 22 int pitch_family, 23 const FX_CHAR* face, 24 int& bExact); 25 26 virtual void* GetFont(const FX_CHAR* face); 27 virtual FX_DWORD GetFontData(void* hFont, 28 FX_DWORD table, 29 uint8_t* buffer, 30 FX_DWORD size); 31 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name); 32 virtual FX_BOOL GetFontCharset(void* hFont, int& charset); 33 34 virtual void DeleteFont(void* hFont); 35 virtual void* RetainFont(void* hFont); 36 FX_BOOL Init(IFPF_FontMgr* pFontMgr); 37 38 protected: 39 IFPF_FontMgr* m_pFontMgr; 40 }; 41 #endif 42 43 #endif // CORE_SRC_FXGE_ANDROID_FX_ANDROID_FONT_H_ 44