Chromium Code Reviews

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

Issue 1248153004: Merge to XFA: FX_BOOL combo patch. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: CTTFontDesc::ReleaseFace() mismatch Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « core/include/fxge/fx_dib.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_image.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 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 318 matching lines...)
329 FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT]; 329 FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT];
330 IFX_FontEnumerator* m_pFontEnumerator; 330 IFX_FontEnumerator* m_pFontEnumerator;
331 }; 331 };
332 class IFX_SystemFontInfo 332 class IFX_SystemFontInfo
333 { 333 {
334 public: 334 public:
335 static IFX_SystemFontInfo* CreateDefault(); 335 static IFX_SystemFontInfo* CreateDefault();
336 virtual void Release() = 0; 336 virtual void Release() = 0;
337 337
338 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; 338 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0;
339 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset , int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) = 0; 339 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset , int pitch_family, const FX_CHAR* face, int& iExact) = 0;
340 virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family) 340 virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
341 { 341 {
342 return NULL; 342 return NULL;
343 } 343 }
344 virtual void* GetFont(const FX_CHAR* face) = 0; 344 virtual void* GetFont(const FX_CHAR* face) = 0;
345 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer , FX_DWORD size) = 0; 345 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer , FX_DWORD size) = 0;
346 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0; 346 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0;
347 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; 347 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
348 virtual int GetFaceIndex(void* hFont) 348 virtual int GetFaceIndex(void* hFont)
349 { 349 {
350 return 0; 350 return 0;
351 } 351 }
352 virtual void DeleteFont(void* hFont) = 0; 352 virtual void DeleteFont(void* hFont) = 0;
353 virtual void* RetainFont(void* hFont) 353 virtual void* RetainFont(void* hFont)
354 { 354 {
355 return NULL; 355 return NULL;
356 } 356 }
357 protected: 357 protected:
358 ~IFX_SystemFontInfo() { } 358 ~IFX_SystemFontInfo() { }
359 }; 359 };
360 class CFX_FolderFontInfo : public IFX_SystemFontInfo 360 class CFX_FolderFontInfo : public IFX_SystemFontInfo
361 { 361 {
362 public: 362 public:
363 CFX_FolderFontInfo(); 363 CFX_FolderFontInfo();
364 virtual ~CFX_FolderFontInfo(); 364 virtual ~CFX_FolderFontInfo();
365 void» » » » AddPath(const CFX_ByteStringC& path); 365
366 virtual void» » Release(); 366 void AddPath(const CFX_ByteStringC& path);
367 virtual» FX_BOOL»» EnumFontList(CFX_FontMapper* pMapper); 367
368 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset , int pitch_family, const FX_CHAR* face, FX_BOOL& bExact); 368 // IFX_SytemFontInfo:
369 virtual void*» » MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family); 369 void Release() override;
370 virtual void*» » GetFont(const FX_CHAR* face); 370 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
371 virtual FX_DWORD» GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer , FX_DWORD size); 371 void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family,
372 virtual void» » DeleteFont(void* hFont); 372 const FX_CHAR* face, int& bExact) override;
373 virtual» FX_BOOL»» GetFaceName(void* hFont, CFX_ByteString& name); 373 void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic,
374 virtual FX_BOOL» » GetFontCharset(void* hFont, int& charset); 374 int pitch_family) override;
375 void* GetFont(const FX_CHAR* face) override;
376 FX_DWORD GetFontData(void* hFont, FX_DWORD table,
377 uint8_t* buffer, FX_DWORD size) override;
378 void DeleteFont(void* hFont) override;
379 FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
380 FX_BOOL GetFontCharset(void* hFont, int& charset) override;
381
375 protected: 382 protected:
376 CFX_MapByteStringToPtr m_FontList; 383 CFX_MapByteStringToPtr m_FontList;
377 CFX_ByteStringArray m_PathList; 384 CFX_ByteStringArray m_PathList;
378 CFX_FontMapper* m_pMapper; 385 CFX_FontMapper* m_pMapper;
379 void ScanPath(CFX_ByteString& path); 386 void ScanPath(CFX_ByteString& path);
380 void ScanFile(CFX_ByteString& path); 387 void ScanFile(CFX_ByteString& path);
381 void ReportFace(CFX_ByteString& path, FXSYS_F ILE* pFile, FX_DWORD filesize, FX_DWORD offset); 388 void ReportFace(CFX_ByteString& path, FXSYS_F ILE* pFile, FX_DWORD filesize, FX_DWORD offset);
382 }; 389 };
383 class CFX_CountedFaceCache 390 class CFX_CountedFaceCache
384 { 391 {
(...skipping 75 matching lines...)
460 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u nsigned long argb); 467 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u nsigned long argb);
461 class IFX_GSUBTable 468 class IFX_GSUBTable
462 { 469 {
463 public: 470 public:
464 static IFX_GSUBTable* Create(CFX_Font* pFont); 471 static IFX_GSUBTable* Create(CFX_Font* pFont);
465 virtual ~IFX_GSUBTable() { } 472 virtual ~IFX_GSUBTable() { }
466 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0 ; 473 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0 ;
467 }; 474 };
468 475
469 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ 476 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_
OLDNEW
« no previous file with comments | « core/include/fxge/fx_dib.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine