Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: core/include/fxge/fpf.h

Issue 1296043002: Merge to XFA: Use override in more classes in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_INCLUDE_FXGE_FPF_H_ 7 #ifndef CORE_INCLUDE_FXGE_FPF_H_
8 #define CORE_INCLUDE_FXGE_FPF_H_ 8 #define CORE_INCLUDE_FXGE_FPF_H_
9 9
10 #include "../fxcrt/fx_coordinates.h" 10 #include "../fxcrt/fx_coordinates.h"
11 11
12 class IFPF_DeviceModule;
13 class IFPF_FontMgr; 12 class IFPF_FontMgr;
14 class IFPF_Font; 13
15 class IFPF_DeviceModule { 14 class IFPF_DeviceModule {
16 public: 15 public:
17 virtual ~IFPF_DeviceModule() {} 16 virtual ~IFPF_DeviceModule() {}
18 virtual void Destroy() = 0; 17 virtual void Destroy() = 0;
19 virtual IFPF_FontMgr* GetFontMgr() = 0; 18 virtual IFPF_FontMgr* GetFontMgr() = 0;
20 }; 19 };
20
21 IFPF_DeviceModule* FPF_GetDeviceModule(); 21 IFPF_DeviceModule* FPF_GetDeviceModule();
22
22 #define FPF_MATCHFONT_REPLACEANSI 1 23 #define FPF_MATCHFONT_REPLACEANSI 1
24
23 typedef struct FPF_HFONT_ { void* pData; } * FPF_HFONT; 25 typedef struct FPF_HFONT_ { void* pData; } * FPF_HFONT;
26
24 class IFPF_Font { 27 class IFPF_Font {
25 public: 28 public:
26 virtual void Release() = 0; 29 virtual void Release() = 0;
27 virtual IFPF_Font* Retain() = 0; 30 virtual IFPF_Font* Retain() = 0;
28 virtual FPF_HFONT GetHandle() = 0; 31 virtual FPF_HFONT GetHandle() = 0;
29 virtual CFX_ByteString GetFamilyName() = 0; 32 virtual CFX_ByteString GetFamilyName() = 0;
30 virtual CFX_WideString GetPsName() = 0; 33 virtual CFX_WideString GetPsName() = 0;
31 virtual FX_DWORD GetFontStyle() const = 0; 34 virtual FX_DWORD GetFontStyle() const = 0;
32 virtual uint8_t GetCharset() const = 0; 35 virtual uint8_t GetCharset() const = 0;
33 36
34 virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode) = 0; 37 virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode) = 0;
35 virtual int32_t GetGlyphWidth(int32_t iGlyphIndex) = 0; 38 virtual int32_t GetGlyphWidth(int32_t iGlyphIndex) = 0;
36 39
37 virtual int32_t GetAscent() const = 0; 40 virtual int32_t GetAscent() const = 0;
38 virtual int32_t GetDescent() const = 0; 41 virtual int32_t GetDescent() const = 0;
39 42
40 virtual FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) = 0; 43 virtual FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) = 0;
41 virtual FX_BOOL GetBBox(FX_RECT& rtBBox) = 0; 44 virtual FX_BOOL GetBBox(FX_RECT& rtBBox) = 0;
42 45
43 virtual int32_t GetHeight() const = 0; 46 virtual int32_t GetHeight() const = 0;
44 virtual int32_t GetItalicAngle() const = 0; 47 virtual int32_t GetItalicAngle() const = 0;
45 virtual FX_DWORD GetFontData(FX_DWORD dwTable, 48 virtual FX_DWORD GetFontData(FX_DWORD dwTable,
46 uint8_t* pBuffer, 49 uint8_t* pBuffer,
47 FX_DWORD dwSize) = 0; 50 FX_DWORD dwSize) = 0;
48 51
49 protected: 52 protected:
50 ~IFPF_Font() {} 53 virtual ~IFPF_Font() {}
51 }; 54 };
55
52 class IFPF_FontMgr { 56 class IFPF_FontMgr {
53 public: 57 public:
54 virtual ~IFPF_FontMgr() {} 58 virtual ~IFPF_FontMgr() {}
55 virtual void LoadSystemFonts() = 0; 59 virtual void LoadSystemFonts() = 0;
56 virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0; 60 virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0;
57 virtual void LoadPrivateFont(const CFX_ByteStringC& bsFileName) = 0; 61 virtual void LoadPrivateFont(const CFX_ByteStringC& bsFileName) = 0;
58 virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer) = 0; 62 virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer) = 0;
59 63
60 virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname, 64 virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname,
61 uint8_t charset, 65 uint8_t charset,
62 FX_DWORD dwStyle, 66 FX_DWORD dwStyle,
63 FX_DWORD dwMatch = 0) = 0; 67 FX_DWORD dwMatch = 0) = 0;
64 }; 68 };
65 69
66 #endif // CORE_INCLUDE_FXGE_FPF_H_ 70 #endif // CORE_INCLUDE_FXGE_FPF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698