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

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

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 6 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/crt/fgas_utils.cpp ('k') | xfa/fgas/font/fgas_fontutils.cpp » ('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_FONT_H_ 7 #ifndef XFA_FGAS_FONT_FGAS_FONT_H_
8 #define XFA_FGAS_FONT_FGAS_FONT_H_ 8 #define XFA_FGAS_FONT_FGAS_FONT_H_
9 9
10 #include "core/fxge/include/fx_font.h" 10 #include "core/fxge/include/fx_font.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const CFX_FontDescriptors& fonts); 81 const CFX_FontDescriptors& fonts);
82 FX_LPMatchFont FX_GetDefFontMatchor(); 82 FX_LPMatchFont FX_GetDefFontMatchor();
83 class IFGAS_FontMgr { 83 class IFGAS_FontMgr {
84 public: 84 public:
85 static IFGAS_FontMgr* Create(FX_LPEnumAllFonts pEnumerator); 85 static IFGAS_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
86 virtual ~IFGAS_FontMgr() {} 86 virtual ~IFGAS_FontMgr() {}
87 virtual void Release() = 0; 87 virtual void Release() = 0;
88 virtual CFGAS_GEFont* GetDefFontByCodePage( 88 virtual CFGAS_GEFont* GetDefFontByCodePage(
89 uint16_t wCodePage, 89 uint16_t wCodePage,
90 uint32_t dwFontStyles, 90 uint32_t dwFontStyles,
91 const FX_WCHAR* pszFontFamily = NULL) = 0; 91 const FX_WCHAR* pszFontFamily = nullptr) = 0;
92 virtual CFGAS_GEFont* GetDefFontByCharset( 92 virtual CFGAS_GEFont* GetDefFontByCharset(
93 uint8_t nCharset, 93 uint8_t nCharset,
94 uint32_t dwFontStyles, 94 uint32_t dwFontStyles,
95 const FX_WCHAR* pszFontFamily = NULL) = 0; 95 const FX_WCHAR* pszFontFamily = nullptr) = 0;
96 virtual CFGAS_GEFont* GetDefFontByUnicode( 96 virtual CFGAS_GEFont* GetDefFontByUnicode(
97 FX_WCHAR wUnicode, 97 FX_WCHAR wUnicode,
98 uint32_t dwFontStyles, 98 uint32_t dwFontStyles,
99 const FX_WCHAR* pszFontFamily = NULL) = 0; 99 const FX_WCHAR* pszFontFamily = nullptr) = 0;
100 virtual CFGAS_GEFont* GetDefFontByLanguage( 100 virtual CFGAS_GEFont* GetDefFontByLanguage(
101 uint16_t wLanguage, 101 uint16_t wLanguage,
102 uint32_t dwFontStyles, 102 uint32_t dwFontStyles,
103 const FX_WCHAR* pszFontFamily = NULL) = 0; 103 const FX_WCHAR* pszFontFamily = nullptr) = 0;
104 virtual CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily, 104 virtual CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
105 uint32_t dwFontStyles, 105 uint32_t dwFontStyles,
106 uint16_t wCodePage = 0xFFFF) = 0; 106 uint16_t wCodePage = 0xFFFF) = 0;
107 virtual CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0; 107 virtual CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
108 virtual CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream, 108 virtual CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
109 const FX_WCHAR* pszFontAlias = NULL, 109 const FX_WCHAR* pszFontAlias = nullptr,
110 uint32_t dwFontStyles = 0, 110 uint32_t dwFontStyles = 0,
111 uint16_t wCodePage = 0, 111 uint16_t wCodePage = 0,
112 FX_BOOL bSaveStream = FALSE) = 0; 112 FX_BOOL bSaveStream = FALSE) = 0;
113 virtual CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont, 113 virtual CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont,
114 uint32_t dwFontStyles, 114 uint32_t dwFontStyles,
115 uint16_t wCodePage = 0xFFFF) = 0; 115 uint16_t wCodePage = 0xFFFF) = 0;
116 virtual void ClearFontCache() = 0; 116 virtual void ClearFontCache() = 0;
117 virtual void RemoveFont(CFGAS_GEFont* pFont) = 0; 117 virtual void RemoveFont(CFGAS_GEFont* pFont) = 0;
118 }; 118 };
119 119
120 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 120 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
121 121
122 class IFGAS_FontMgr { 122 class IFGAS_FontMgr {
123 public: 123 public:
124 static IFGAS_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum); 124 static IFGAS_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum);
125 virtual ~IFGAS_FontMgr() {} 125 virtual ~IFGAS_FontMgr() {}
126 virtual void Release() = 0; 126 virtual void Release() = 0;
127 virtual CFGAS_GEFont* GetDefFontByCodePage( 127 virtual CFGAS_GEFont* GetDefFontByCodePage(
128 uint16_t wCodePage, 128 uint16_t wCodePage,
129 uint32_t dwFontStyles, 129 uint32_t dwFontStyles,
130 const FX_WCHAR* pszFontFamily = NULL) = 0; 130 const FX_WCHAR* pszFontFamily = nullptr) = 0;
131 virtual CFGAS_GEFont* GetDefFontByCharset( 131 virtual CFGAS_GEFont* GetDefFontByCharset(
132 uint8_t nCharset, 132 uint8_t nCharset,
133 uint32_t dwFontStyles, 133 uint32_t dwFontStyles,
134 const FX_WCHAR* pszFontFamily = NULL) = 0; 134 const FX_WCHAR* pszFontFamily = nullptr) = 0;
135 virtual CFGAS_GEFont* GetDefFontByUnicode( 135 virtual CFGAS_GEFont* GetDefFontByUnicode(
136 FX_WCHAR wUnicode, 136 FX_WCHAR wUnicode,
137 uint32_t dwFontStyles, 137 uint32_t dwFontStyles,
138 const FX_WCHAR* pszFontFamily = NULL) = 0; 138 const FX_WCHAR* pszFontFamily = nullptr) = 0;
139 virtual CFGAS_GEFont* GetDefFontByLanguage( 139 virtual CFGAS_GEFont* GetDefFontByLanguage(
140 uint16_t wLanguage, 140 uint16_t wLanguage,
141 uint32_t dwFontStyles, 141 uint32_t dwFontStyles,
142 const FX_WCHAR* pszFontFamily = NULL) = 0; 142 const FX_WCHAR* pszFontFamily = nullptr) = 0;
143 virtual CFGAS_GEFont* GetFontByCodePage( 143 virtual CFGAS_GEFont* GetFontByCodePage(
144 uint16_t wCodePage, 144 uint16_t wCodePage,
145 uint32_t dwFontStyles, 145 uint32_t dwFontStyles,
146 const FX_WCHAR* pszFontFamily = NULL) = 0; 146 const FX_WCHAR* pszFontFamily = nullptr) = 0;
147 inline CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily, 147 inline CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
148 uint32_t dwFontStyles, 148 uint32_t dwFontStyles,
149 uint16_t wCodePage) { 149 uint16_t wCodePage) {
150 return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily); 150 return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
151 } 151 }
152 virtual CFGAS_GEFont* GetFontByCharset( 152 virtual CFGAS_GEFont* GetFontByCharset(
153 uint8_t nCharset, 153 uint8_t nCharset,
154 uint32_t dwFontStyles, 154 uint32_t dwFontStyles,
155 const FX_WCHAR* pszFontFamily = NULL) = 0; 155 const FX_WCHAR* pszFontFamily = nullptr) = 0;
156 virtual CFGAS_GEFont* GetFontByUnicode( 156 virtual CFGAS_GEFont* GetFontByUnicode(
157 FX_WCHAR wUnicode, 157 FX_WCHAR wUnicode,
158 uint32_t dwFontStyles, 158 uint32_t dwFontStyles,
159 const FX_WCHAR* pszFontFamily = NULL) = 0; 159 const FX_WCHAR* pszFontFamily = nullptr) = 0;
160 virtual CFGAS_GEFont* GetFontByLanguage( 160 virtual CFGAS_GEFont* GetFontByLanguage(
161 uint16_t wLanguage, 161 uint16_t wLanguage,
162 uint32_t dwFontStyles, 162 uint32_t dwFontStyles,
163 const FX_WCHAR* pszFontFamily = NULL) = 0; 163 const FX_WCHAR* pszFontFamily = nullptr) = 0;
164 virtual void ClearFontCache() = 0; 164 virtual void ClearFontCache() = 0;
165 virtual void RemoveFont(CFGAS_GEFont* pFont) = 0; 165 virtual void RemoveFont(CFGAS_GEFont* pFont) = 0;
166 }; 166 };
167 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 167 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
168 168
169 #endif // XFA_FGAS_FONT_FGAS_FONT_H_ 169 #endif // XFA_FGAS_FONT_FGAS_FONT_H_
OLDNEW
« no previous file with comments | « xfa/fgas/crt/fgas_utils.cpp ('k') | xfa/fgas/font/fgas_fontutils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698