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 _FX_PALTFORM_DEVICE_H_ | 7 #ifndef _FX_PALTFORM_DEVICE_H_ |
8 #define _FX_PALTFORM_DEVICE_H_ | 8 #define _FX_PALTFORM_DEVICE_H_ |
9 class IFPF_DeviceModule; | 9 class IFPF_DeviceModule; |
10 class IFPF_FontMgr; | 10 class IFPF_FontMgr; |
11 class IFPF_Font; | 11 class IFPF_Font; |
12 class IFPF_DeviceModule | 12 class IFPF_DeviceModule { |
13 { | 13 public: |
14 public: | 14 virtual void Destroy() = 0; |
15 virtual void» » » » Destroy() = 0; | 15 virtual IFPF_FontMgr* GetFontMgr() = 0; |
16 virtual IFPF_FontMgr*» » GetFontMgr() = 0; | |
17 }; | 16 }; |
18 IFPF_DeviceModule*» FPF_GetDeviceModule(); | 17 IFPF_DeviceModule* FPF_GetDeviceModule(); |
19 #define FPF_MATCHFONT_REPLACEANSI» » 1 | 18 #define FPF_MATCHFONT_REPLACEANSI 1 |
20 FX_DEFINEHANDLE(FPF_HFONT); | 19 FX_DEFINEHANDLE(FPF_HFONT); |
21 class IFPF_Font | 20 class IFPF_Font { |
22 { | 21 public: |
23 public: | 22 virtual void Release() = 0; |
24 virtual void» » » Release() = 0; | 23 virtual IFPF_Font* Retain() = 0; |
25 virtual IFPF_Font*» » Retain() = 0; | 24 virtual FPF_HFONT GetHandle() = 0; |
26 virtual FPF_HFONT» » GetHandle() = 0; | 25 virtual CFX_ByteString GetFamilyName() = 0; |
27 virtual CFX_ByteString» GetFamilyName() = 0; | 26 virtual CFX_WideString GetPsName() = 0; |
28 virtual CFX_WideString» GetPsName() = 0; | 27 virtual FX_DWORD GetFontStyle() const = 0; |
29 virtual FX_DWORD» » GetFontStyle() const = 0; | 28 virtual FX_BYTE GetCharset() const = 0; |
30 virtual FX_BYTE» » » GetCharset() const = 0; | |
31 | 29 |
32 virtual FX_INT32» » GetGlyphIndex(FX_WCHAR wUnicode) = 0; | 30 virtual FX_INT32 GetGlyphIndex(FX_WCHAR wUnicode) = 0; |
33 virtual FX_INT32» » GetGlyphWidth(FX_INT32 iGlyphIndex) = 0; | 31 virtual FX_INT32 GetGlyphWidth(FX_INT32 iGlyphIndex) = 0; |
34 | 32 |
35 virtual FX_INT32» » GetAscent() const = 0; | 33 virtual FX_INT32 GetAscent() const = 0; |
36 virtual FX_INT32» » GetDescent() const = 0; | 34 virtual FX_INT32 GetDescent() const = 0; |
37 | 35 |
38 virtual FX_BOOL» » » GetGlyphBBox(FX_INT32 iGlyphIndex, FX_RE
CT &rtBBox) = 0; | 36 virtual FX_BOOL GetGlyphBBox(FX_INT32 iGlyphIndex, FX_RECT& rtBBox) = 0; |
39 virtual FX_BOOL» » » GetBBox(FX_RECT &rtBBox) = 0; | 37 virtual FX_BOOL GetBBox(FX_RECT& rtBBox) = 0; |
40 | 38 |
41 virtual FX_INT32» » GetHeight() const = 0; | 39 virtual FX_INT32 GetHeight() const = 0; |
42 virtual FX_INT32» » GetItalicAngle() const = 0; | 40 virtual FX_INT32 GetItalicAngle() const = 0; |
43 virtual FX_DWORD» » GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer,
FX_DWORD dwSize) = 0; | 41 virtual FX_DWORD GetFontData(FX_DWORD dwTable, |
| 42 FX_LPBYTE pBuffer, |
| 43 FX_DWORD dwSize) = 0; |
44 }; | 44 }; |
45 class IFPF_FontMgr | 45 class IFPF_FontMgr { |
46 { | 46 public: |
47 public: | 47 virtual void LoadSystemFonts() = 0; |
48 virtual void» » » LoadSystemFonts() = 0; | 48 virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0; |
49 virtual void» » » LoadPrivateFont(IFX_FileRead* pFontFile)
= 0; | 49 virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0; |
50 virtual void» » » LoadPrivateFont(FX_BSTR bsFileName) = 0; | 50 virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) = 0; |
51 virtual void» » » LoadPrivateFont(FX_LPVOID pBuffer, size_
t szBuffer) = 0; | |
52 | 51 |
53 virtual IFPF_Font*» » CreateFont(FX_BSTR bsFamilyname, FX_BYTE charset
, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0; | 52 virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, |
| 53 FX_BYTE charset, |
| 54 FX_DWORD dwStyle, |
| 55 FX_DWORD dwMatch = 0) = 0; |
54 }; | 56 }; |
55 #endif | 57 #endif |
OLD | NEW |