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

Side by Side Diff: xfa/fgas/font/fgas_gefont.h

Issue 1835703002: Remove FX_DWORD from XFA, part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « xfa/fgas/font/fgas_fontutils.h ('k') | xfa/fgas/font/fgas_stdfontmgr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 XFA_FGAS_FONT_FGAS_GEFONT_H_ 7 #ifndef XFA_FGAS_FONT_FGAS_GEFONT_H_
8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_ 8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_
9 9
10 #include "xfa/fgas/crt/fgas_utils.h" 10 #include "xfa/fgas/crt/fgas_utils.h"
11 #include "xfa/fgas/font/fgas_font.h" 11 #include "xfa/fgas/font/fgas_font.h"
12 12
13 #define FXFONT_SUBST_ITALIC 0x02 13 #define FXFONT_SUBST_ITALIC 0x02
14 14
15 class CFX_GEFont : public IFX_Font { 15 class CFX_GEFont : public IFX_Font {
16 public: 16 public:
17 CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles); 17 CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles);
18 CFX_GEFont(IFX_FontMgr* pFontMgr); 18 CFX_GEFont(IFX_FontMgr* pFontMgr);
19 ~CFX_GEFont(); 19 ~CFX_GEFont();
20 virtual void Release(); 20 virtual void Release();
21 virtual IFX_Font* Retain(); 21 virtual IFX_Font* Retain();
22 FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily, 22 FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
23 FX_DWORD dwFontStyles, 23 uint32_t dwFontStyles,
24 uint16_t wCodePage); 24 uint16_t wCodePage);
25 FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length); 25 FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
26 FX_BOOL LoadFont(const FX_WCHAR* pszFileName); 26 FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
27 FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream); 27 FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream);
28 FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver = FALSE); 28 FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver = FALSE);
29 virtual IFX_Font* Derive(FX_DWORD dwFontStyles, uint16_t wCodePage = 0); 29 virtual IFX_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
30 virtual void GetFamilyName(CFX_WideString& wsFamily) const; 30 virtual void GetFamilyName(CFX_WideString& wsFamily) const;
31 virtual void GetPsName(CFX_WideString& wsName) const; 31 virtual void GetPsName(CFX_WideString& wsName) const;
32 virtual FX_DWORD GetFontStyles() const; 32 virtual uint32_t GetFontStyles() const;
33 virtual uint8_t GetCharSet() const; 33 virtual uint8_t GetCharSet() const;
34 virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode, 34 virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
35 int32_t& iWidth, 35 int32_t& iWidth,
36 FX_BOOL bCharCode = FALSE); 36 FX_BOOL bCharCode = FALSE);
37 virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE); 37 virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE);
38 virtual int32_t GetAscent() const; 38 virtual int32_t GetAscent() const;
39 virtual int32_t GetDescent() const; 39 virtual int32_t GetDescent() const;
40 virtual FX_BOOL GetCharBBox(FX_WCHAR wUnicode, 40 virtual FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
41 CFX_Rect& bbox, 41 CFX_Rect& bbox,
42 FX_BOOL bCharCode = FALSE); 42 FX_BOOL bCharCode = FALSE);
43 virtual FX_BOOL GetBBox(CFX_Rect& bbox); 43 virtual FX_BOOL GetBBox(CFX_Rect& bbox);
44 virtual int32_t GetItalicAngle() const; 44 virtual int32_t GetItalicAngle() const;
45 virtual void Reset(); 45 virtual void Reset();
46 virtual IFX_Font* GetSubstFont(int32_t iGlyphIndex) const; 46 virtual IFX_Font* GetSubstFont(int32_t iGlyphIndex) const;
47 virtual void* GetDevFont() const { return (void*)m_pFont; } 47 virtual void* GetDevFont() const { return (void*)m_pFont; }
48 virtual void SetFontProvider(IFX_FontProvider* pProvider) { 48 virtual void SetFontProvider(IFX_FontProvider* pProvider) {
49 m_pProvider = pProvider; 49 m_pProvider = pProvider;
50 } 50 }
51 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 51 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
52 virtual void SetLogicalFontStyle(FX_DWORD dwLogFontStyle) { 52 virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) {
53 m_bUseLogFontStyle = TRUE; 53 m_bUseLogFontStyle = TRUE;
54 m_dwLogFontStyle = dwLogFontStyle; 54 m_dwLogFontStyle = dwLogFontStyle;
55 } 55 }
56 #endif 56 #endif
57 57
58 protected: 58 protected:
59 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 59 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
60 FX_BOOL m_bUseLogFontStyle; 60 FX_BOOL m_bUseLogFontStyle;
61 FX_DWORD m_dwLogFontStyle; 61 uint32_t m_dwLogFontStyle;
62 #endif 62 #endif
63 CFX_Font* m_pFont; 63 CFX_Font* m_pFont;
64 IFX_FontMgr* m_pFontMgr; 64 IFX_FontMgr* m_pFontMgr;
65 int32_t m_iRefCount; 65 int32_t m_iRefCount;
66 FX_BOOL m_bExtFont; 66 FX_BOOL m_bExtFont;
67 IFX_Stream* m_pStream; 67 IFX_Stream* m_pStream;
68 IFX_FileRead* m_pFileRead; 68 IFX_FileRead* m_pFileRead;
69 CFX_UnicodeEncoding* m_pFontEncoding; 69 CFX_UnicodeEncoding* m_pFontEncoding;
70 CFX_WordDiscreteArray* m_pCharWidthMap; 70 CFX_WordDiscreteArray* m_pCharWidthMap;
71 CFX_RectMassArray* m_pRectArray; 71 CFX_RectMassArray* m_pRectArray;
(...skipping 11 matching lines...) Expand all
83 int32_t& iWidth, 83 int32_t& iWidth,
84 FX_BOOL bRecursive, 84 FX_BOOL bRecursive,
85 FX_BOOL bCharCode = FALSE); 85 FX_BOOL bCharCode = FALSE);
86 int32_t GetGlyphIndex(FX_WCHAR wUnicode, 86 int32_t GetGlyphIndex(FX_WCHAR wUnicode,
87 FX_BOOL bRecursive, 87 FX_BOOL bRecursive,
88 IFX_Font** ppFont, 88 IFX_Font** ppFont,
89 FX_BOOL bCharCode = FALSE); 89 FX_BOOL bCharCode = FALSE);
90 }; 90 };
91 91
92 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_ 92 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_
OLDNEW
« no previous file with comments | « xfa/fgas/font/fgas_fontutils.h ('k') | xfa/fgas/font/fgas_stdfontmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698