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