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_SRC_FXGE_ANDROID_FPF_SKIAFONT_H_ | |
8 #define CORE_SRC_FXGE_ANDROID_FPF_SKIAFONT_H_ | |
9 | |
10 #include "core/include/fxcrt/fx_system.h" | |
11 | |
12 #if _FX_OS_ == _FX_ANDROID_ | |
13 | |
14 #include "core/include/fxge/fpf.h" | |
15 #include "core/include/fxge/fx_font.h" | |
16 | |
17 class CFPF_SkiaFontDescriptor; | |
18 class CFPF_SkiaFontMgr; | |
19 class CFPF_SkiaFont : public IFPF_Font { | |
20 public: | |
21 CFPF_SkiaFont(); | |
22 ~CFPF_SkiaFont() override; | |
23 | |
24 // IFPF_Font | |
25 void Release() override; | |
26 IFPF_Font* Retain() override; | |
27 FPF_HFONT GetHandle() override; | |
28 CFX_ByteString GetFamilyName() override; | |
29 CFX_WideString GetPsName() override; | |
30 FX_DWORD GetFontStyle() const override { return m_dwStyle; } | |
31 uint8_t GetCharset() const override { return m_uCharset; } | |
32 int32_t GetGlyphIndex(FX_WCHAR wUnicode) override; | |
33 int32_t GetGlyphWidth(int32_t iGlyphIndex) override; | |
34 int32_t GetAscent() const override; | |
35 int32_t GetDescent() const override; | |
36 FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) override; | |
37 FX_BOOL GetBBox(FX_RECT& rtBBox) override; | |
38 int32_t GetHeight() const override; | |
39 int32_t GetItalicAngle() const override; | |
40 FX_DWORD GetFontData(FX_DWORD dwTable, | |
41 uint8_t* pBuffer, | |
42 FX_DWORD dwSize) override; | |
43 | |
44 FX_BOOL InitFont(CFPF_SkiaFontMgr* pFontMgr, | |
45 CFPF_SkiaFontDescriptor* pFontDes, | |
46 const CFX_ByteStringC& bsFamily, | |
47 FX_DWORD dwStyle, | |
48 uint8_t uCharset); | |
49 | |
50 protected: | |
51 CFPF_SkiaFontMgr* m_pFontMgr; | |
52 CFPF_SkiaFontDescriptor* m_pFontDes; | |
53 FXFT_Face m_Face; | |
54 FX_DWORD m_dwStyle; | |
55 uint8_t m_uCharset; | |
56 FX_DWORD m_dwRefCount; | |
57 }; | |
58 #endif | |
59 | |
60 #endif // CORE_SRC_FXGE_ANDROID_FPF_SKIAFONT_H_ | |
OLD | NEW |