OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_FPF_SKIAFONT_H_ | 7 #ifndef CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ |
8 #define CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ | 8 #define CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
11 | 11 |
12 #if _FX_OS_ == _FX_ANDROID_ | 12 #if _FX_OS_ == _FX_ANDROID_ |
13 | 13 |
14 #include "core/fxge/include/fx_font.h" | 14 #include "core/fxge/include/fx_font.h" |
15 | 15 |
16 class CFPF_SkiaFontDescriptor; | 16 class CFPF_SkiaFontDescriptor; |
17 class CFPF_SkiaFontMgr; | 17 class CFPF_SkiaFontMgr; |
18 | 18 |
19 typedef struct FPF_HFONT_ { void* pData; } * FPF_HFONT; | |
20 | |
21 class CFPF_SkiaFont { | 19 class CFPF_SkiaFont { |
22 public: | 20 public: |
23 CFPF_SkiaFont(); | 21 CFPF_SkiaFont(); |
24 ~CFPF_SkiaFont(); | 22 ~CFPF_SkiaFont(); |
25 | 23 |
26 void Release(); | 24 void Release(); |
27 CFPF_SkiaFont* Retain(); | 25 CFPF_SkiaFont* Retain(); |
28 | 26 |
29 FPF_HFONT GetHandle(); | |
30 CFX_ByteString GetFamilyName(); | 27 CFX_ByteString GetFamilyName(); |
31 CFX_ByteString GetPsName(); | 28 CFX_ByteString GetPsName(); |
32 uint32_t GetFontStyle() const { return m_dwStyle; } | 29 uint32_t GetFontStyle() const { return m_dwStyle; } |
33 uint8_t GetCharset() const { return m_uCharset; } | 30 uint8_t GetCharset() const { return m_uCharset; } |
34 int32_t GetGlyphIndex(FX_WCHAR wUnicode); | 31 int32_t GetGlyphIndex(FX_WCHAR wUnicode); |
35 int32_t GetGlyphWidth(int32_t iGlyphIndex); | 32 int32_t GetGlyphWidth(int32_t iGlyphIndex); |
36 int32_t GetAscent() const; | 33 int32_t GetAscent() const; |
37 int32_t GetDescent() const; | 34 int32_t GetDescent() const; |
38 FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox); | 35 FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox); |
39 FX_BOOL GetBBox(FX_RECT& rtBBox); | 36 FX_BOOL GetBBox(FX_RECT& rtBBox); |
(...skipping 12 matching lines...) Expand all Loading... |
52 CFPF_SkiaFontDescriptor* m_pFontDes; | 49 CFPF_SkiaFontDescriptor* m_pFontDes; |
53 FXFT_Face m_Face; | 50 FXFT_Face m_Face; |
54 uint32_t m_dwStyle; | 51 uint32_t m_dwStyle; |
55 uint8_t m_uCharset; | 52 uint8_t m_uCharset; |
56 uint32_t m_dwRefCount; | 53 uint32_t m_dwRefCount; |
57 }; | 54 }; |
58 | 55 |
59 #endif // _FX_OS_ == _FX_ANDROID_ | 56 #endif // _FX_OS_ == _FX_ANDROID_ |
60 | 57 |
61 #endif // CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ | 58 #endif // CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ |
OLD | NEW |