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

Side by Side Diff: core/include/fxge/fx_font.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_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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 virtual void Finish() = 0; 271 virtual void Finish() = 0;
272 }; 272 };
273 class IFX_AdditionalFontEnum { 273 class IFX_AdditionalFontEnum {
274 public: 274 public:
275 virtual ~IFX_AdditionalFontEnum() {} 275 virtual ~IFX_AdditionalFontEnum() {}
276 virtual int CountFiles() = 0; 276 virtual int CountFiles() = 0;
277 virtual IFX_FileStream* GetFontFile(int index) = 0; 277 virtual IFX_FileStream* GetFontFile(int index) = 0;
278 }; 278 };
279 class CFX_FontMapper { 279 class CFX_FontMapper {
280 public: 280 public:
281 CFX_FontMapper(CFX_FontMgr* mgr); 281 explicit CFX_FontMapper(CFX_FontMgr* mgr);
282 ~CFX_FontMapper(); 282 ~CFX_FontMapper();
283 283
284 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); 284 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
285 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } 285 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; }
286 void AddInstalledFont(const CFX_ByteString& name, int charset); 286 void AddInstalledFont(const CFX_ByteString& name, int charset);
287 void LoadInstalledFonts(); 287 void LoadInstalledFonts();
288 CFX_ByteStringArray m_InstalledTTFonts; 288 CFX_ByteStringArray m_InstalledTTFonts;
289 void SetFontEnumerator(IFX_FontEnumerator* pFontEnumerator) { 289 void SetFontEnumerator(IFX_FontEnumerator* pFontEnumerator) {
290 m_pFontEnumerator = pFontEnumerator; 290 m_pFontEnumerator = pFontEnumerator;
291 } 291 }
(...skipping 27 matching lines...) Expand all
319 FX_BOOL m_bListLoaded; 319 FX_BOOL m_bListLoaded;
320 FXFT_Face m_MMFaces[MM_FACE_COUNT]; 320 FXFT_Face m_MMFaces[MM_FACE_COUNT];
321 CFX_ByteString m_LastFamily; 321 CFX_ByteString m_LastFamily;
322 CFX_DWordArray m_CharsetArray; 322 CFX_DWordArray m_CharsetArray;
323 CFX_ByteStringArray m_FaceArray; 323 CFX_ByteStringArray m_FaceArray;
324 IFX_SystemFontInfo* m_pFontInfo; 324 IFX_SystemFontInfo* m_pFontInfo;
325 FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT]; 325 FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT];
326 IFX_FontEnumerator* m_pFontEnumerator; 326 IFX_FontEnumerator* m_pFontEnumerator;
327 CFX_FontMgr* const m_pFontMgr; 327 CFX_FontMgr* const m_pFontMgr;
328 }; 328 };
329
329 class IFX_SystemFontInfo { 330 class IFX_SystemFontInfo {
330 public: 331 public:
331 static IFX_SystemFontInfo* CreateDefault(); 332 static IFX_SystemFontInfo* CreateDefault();
332 virtual void Release() = 0; 333 virtual void Release() = 0;
333 334
334 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; 335 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0;
335 virtual void* MapFont(int weight, 336 virtual void* MapFont(int weight,
336 FX_BOOL bItalic, 337 FX_BOOL bItalic,
337 int charset, 338 int charset,
338 int pitch_family, 339 int pitch_family,
(...skipping 10 matching lines...) Expand all
349 FX_DWORD table, 350 FX_DWORD table,
350 uint8_t* buffer, 351 uint8_t* buffer,
351 FX_DWORD size) = 0; 352 FX_DWORD size) = 0;
352 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0; 353 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0;
353 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; 354 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
354 virtual int GetFaceIndex(void* hFont) { return 0; } 355 virtual int GetFaceIndex(void* hFont) { return 0; }
355 virtual void DeleteFont(void* hFont) = 0; 356 virtual void DeleteFont(void* hFont) = 0;
356 virtual void* RetainFont(void* hFont) { return NULL; } 357 virtual void* RetainFont(void* hFont) { return NULL; }
357 358
358 protected: 359 protected:
359 ~IFX_SystemFontInfo() {} 360 virtual ~IFX_SystemFontInfo() {}
360 }; 361 };
362
361 class CFX_FolderFontInfo : public IFX_SystemFontInfo { 363 class CFX_FolderFontInfo : public IFX_SystemFontInfo {
362 public: 364 public:
363 CFX_FolderFontInfo(); 365 CFX_FolderFontInfo();
364 virtual ~CFX_FolderFontInfo(); 366 ~CFX_FolderFontInfo() override;
365 367
366 void AddPath(const CFX_ByteStringC& path); 368 void AddPath(const CFX_ByteStringC& path);
367 369
368 // IFX_SytemFontInfo: 370 // IFX_SytemFontInfo:
369 void Release() override; 371 void Release() override;
370 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; 372 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
371 void* MapFont(int weight, 373 void* MapFont(int weight,
372 FX_BOOL bItalic, 374 FX_BOOL bItalic,
373 int charset, 375 int charset,
374 int pitch_family, 376 int pitch_family,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 FX_FLOAT retinaScaleX = 1.0f, 488 FX_FLOAT retinaScaleX = 1.0f,
487 FX_FLOAT retinaScaleY = 1.0f); 489 FX_FLOAT retinaScaleY = 1.0f);
488 class IFX_GSUBTable { 490 class IFX_GSUBTable {
489 public: 491 public:
490 static IFX_GSUBTable* Create(CFX_Font* pFont); 492 static IFX_GSUBTable* Create(CFX_Font* pFont);
491 virtual ~IFX_GSUBTable() {} 493 virtual ~IFX_GSUBTable() {}
492 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; 494 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
493 }; 495 };
494 496
495 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ 497 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698