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

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

Issue 1292613003: Use override in more classes in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit 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
« no previous file with comments | « core/include/fxge/fx_dib.h ('k') | core/include/fxge/fx_ge.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 CORE_INCLUDE_FXGE_FX_FONT_H_ 7 #ifndef CORE_INCLUDE_FXGE_FX_FONT_H_
8 #define CORE_INCLUDE_FXGE_FX_FONT_H_ 8 #define CORE_INCLUDE_FXGE_FX_FONT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 virtual void Finish() = 0; 237 virtual void Finish() = 0;
238 }; 238 };
239 class IFX_AdditionalFontEnum { 239 class IFX_AdditionalFontEnum {
240 public: 240 public:
241 virtual ~IFX_AdditionalFontEnum() {} 241 virtual ~IFX_AdditionalFontEnum() {}
242 virtual int CountFiles() = 0; 242 virtual int CountFiles() = 0;
243 virtual IFX_FileStream* GetFontFile(int index) = 0; 243 virtual IFX_FileStream* GetFontFile(int index) = 0;
244 }; 244 };
245 class CFX_FontMapper { 245 class CFX_FontMapper {
246 public: 246 public:
247 CFX_FontMapper(CFX_FontMgr* mgr); 247 explicit CFX_FontMapper(CFX_FontMgr* mgr);
248 ~CFX_FontMapper(); 248 ~CFX_FontMapper();
249 249
250 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); 250 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
251 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } 251 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; }
252 void AddInstalledFont(const CFX_ByteString& name, int charset); 252 void AddInstalledFont(const CFX_ByteString& name, int charset);
253 void LoadInstalledFonts(); 253 void LoadInstalledFonts();
254 CFX_ByteStringArray m_InstalledTTFonts; 254 CFX_ByteStringArray m_InstalledTTFonts;
255 void SetFontEnumerator(IFX_FontEnumerator* pFontEnumerator) { 255 void SetFontEnumerator(IFX_FontEnumerator* pFontEnumerator) {
256 m_pFontEnumerator = pFontEnumerator; 256 m_pFontEnumerator = pFontEnumerator;
257 } 257 }
(...skipping 18 matching lines...) Expand all
276 FX_BOOL m_bListLoaded; 276 FX_BOOL m_bListLoaded;
277 FXFT_Face m_MMFaces[2]; 277 FXFT_Face m_MMFaces[2];
278 CFX_ByteString m_LastFamily; 278 CFX_ByteString m_LastFamily;
279 CFX_DWordArray m_CharsetArray; 279 CFX_DWordArray m_CharsetArray;
280 CFX_ByteStringArray m_FaceArray; 280 CFX_ByteStringArray m_FaceArray;
281 IFX_SystemFontInfo* m_pFontInfo; 281 IFX_SystemFontInfo* m_pFontInfo;
282 FXFT_Face m_FoxitFaces[14]; 282 FXFT_Face m_FoxitFaces[14];
283 IFX_FontEnumerator* m_pFontEnumerator; 283 IFX_FontEnumerator* m_pFontEnumerator;
284 CFX_FontMgr* const m_pFontMgr; 284 CFX_FontMgr* const m_pFontMgr;
285 }; 285 };
286
286 class IFX_SystemFontInfo { 287 class IFX_SystemFontInfo {
287 public: 288 public:
288 static IFX_SystemFontInfo* CreateDefault(const char** pUserPaths); 289 static IFX_SystemFontInfo* CreateDefault(const char** pUserPaths);
289 virtual void Release() = 0; 290 virtual void Release() = 0;
290 291
291 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; 292 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0;
292 virtual void* MapFont(int weight, 293 virtual void* MapFont(int weight,
293 FX_BOOL bItalic, 294 FX_BOOL bItalic,
294 int charset, 295 int charset,
295 int pitch_family, 296 int pitch_family,
296 const FX_CHAR* face, 297 const FX_CHAR* face,
297 int& iExact) = 0; 298 int& iExact) = 0;
298 virtual void* GetFont(const FX_CHAR* face) = 0; 299 virtual void* GetFont(const FX_CHAR* face) = 0;
299 virtual FX_DWORD GetFontData(void* hFont, 300 virtual FX_DWORD GetFontData(void* hFont,
300 FX_DWORD table, 301 FX_DWORD table,
301 uint8_t* buffer, 302 uint8_t* buffer,
302 FX_DWORD size) = 0; 303 FX_DWORD size) = 0;
303 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0; 304 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0;
304 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; 305 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
305 virtual int GetFaceIndex(void* hFont) { return 0; } 306 virtual int GetFaceIndex(void* hFont) { return 0; }
306 virtual void DeleteFont(void* hFont) = 0; 307 virtual void DeleteFont(void* hFont) = 0;
307 virtual void* RetainFont(void* hFont) { return NULL; } 308 virtual void* RetainFont(void* hFont) { return NULL; }
308 309
309 protected: 310 protected:
310 ~IFX_SystemFontInfo() {} 311 virtual ~IFX_SystemFontInfo() {}
311 }; 312 };
313
312 class CFX_FolderFontInfo : public IFX_SystemFontInfo { 314 class CFX_FolderFontInfo : public IFX_SystemFontInfo {
313 public: 315 public:
314 CFX_FolderFontInfo(); 316 CFX_FolderFontInfo();
315 virtual ~CFX_FolderFontInfo(); 317 ~CFX_FolderFontInfo() override;
316 void AddPath(const CFX_ByteStringC& path); 318 void AddPath(const CFX_ByteStringC& path);
317 319
318 // IFX_SytemFontInfo: 320 // IFX_SytemFontInfo:
319 void Release() override; 321 void Release() override;
320 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; 322 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
321 void* MapFont(int weight, 323 void* MapFont(int weight,
322 FX_BOOL bItalic, 324 FX_BOOL bItalic,
323 int charset, 325 int charset,
324 int pitch_family, 326 int pitch_family,
325 const FX_CHAR* face, 327 const FX_CHAR* face,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 FX_FLOAT retinaScaleX = 1.0f, 434 FX_FLOAT retinaScaleX = 1.0f,
433 FX_FLOAT retinaScaleY = 1.0f); 435 FX_FLOAT retinaScaleY = 1.0f);
434 class IFX_GSUBTable { 436 class IFX_GSUBTable {
435 public: 437 public:
436 static IFX_GSUBTable* Create(CFX_Font* pFont); 438 static IFX_GSUBTable* Create(CFX_Font* pFont);
437 virtual ~IFX_GSUBTable() {} 439 virtual ~IFX_GSUBTable() {}
438 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; 440 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
439 }; 441 };
440 442
441 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ 443 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_
OLDNEW
« no previous file with comments | « core/include/fxge/fx_dib.h ('k') | core/include/fxge/fx_ge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698