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