diff options
author | John Abd-El-Malek <jabdelmalek@google.com> | 2014-05-17 22:33:34 -0700 |
---|---|---|
committer | John Abd-El-Malek <jabdelmalek@google.com> | 2014-05-17 22:33:34 -0700 |
commit | 5110c4743751145c4ae1934cd1d83bc6c55bb43f (patch) | |
tree | b141608096b73163182764c25b895d3df4b2c182 /core/include/fxge/fpf.h | |
parent | 76b563d2feed92ed328afb1f15e3466a9536b11b (diff) | |
download | pdfium-5110c4743751145c4ae1934cd1d83bc6c55bb43f.tar.xz |
Initial commit.
Diffstat (limited to 'core/include/fxge/fpf.h')
-rw-r--r-- | core/include/fxge/fpf.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h new file mode 100644 index 0000000000..99d9b7c999 --- /dev/null +++ b/core/include/fxge/fpf.h @@ -0,0 +1,55 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef _FX_PALTFORM_DEVICE_H_ +#define _FX_PALTFORM_DEVICE_H_ +class IFPF_DeviceModule; +class IFPF_FontMgr; +class IFPF_Font; +class IFPF_DeviceModule +{ +public: + virtual void Destroy() = 0; + virtual IFPF_FontMgr* GetFontMgr() = 0; +}; +IFPF_DeviceModule* FPF_GetDeviceModule(); +#define FPF_MATCHFONT_REPLACEANSI 1 +FX_DEFINEHANDLE(FPF_HFONT); +class IFPF_Font +{ +public: + virtual void Release() = 0; + virtual IFPF_Font* Retain() = 0; + virtual FPF_HFONT GetHandle() = 0; + virtual CFX_ByteString GetFamilyName() = 0; + virtual CFX_WideString GetPsName() = 0; + virtual FX_DWORD GetFontStyle() const = 0; + virtual FX_BYTE GetCharset() const = 0; + + virtual FX_INT32 GetGlyphIndex(FX_WCHAR wUnicode) = 0; + virtual FX_INT32 GetGlyphWidth(FX_INT32 iGlyphIndex) = 0; + + virtual FX_INT32 GetAscent() const = 0; + virtual FX_INT32 GetDescent() const = 0; + + virtual FX_BOOL GetGlyphBBox(FX_INT32 iGlyphIndex, FX_RECT &rtBBox) = 0; + virtual FX_BOOL GetBBox(FX_RECT &rtBBox) = 0; + + virtual FX_INT32 GetHeight() const = 0; + virtual FX_INT32 GetItalicAngle() const = 0; + virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) = 0; +}; +class IFPF_FontMgr +{ +public: + virtual void LoadSystemFonts() = 0; + virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0; + virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0; + virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) = 0; + + virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, FX_BYTE charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0; +}; +#endif |