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