| OLD | NEW |
| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 FXFT_Face m_FoxitFaces[14]; | 293 FXFT_Face m_FoxitFaces[14]; |
| 294 IFX_FontEnumerator* m_pFontEnumerator; | 294 IFX_FontEnumerator* m_pFontEnumerator; |
| 295 }; | 295 }; |
| 296 class IFX_SystemFontInfo | 296 class IFX_SystemFontInfo |
| 297 { | 297 { |
| 298 public: | 298 public: |
| 299 static IFX_SystemFontInfo* CreateDefault(); | 299 static IFX_SystemFontInfo* CreateDefault(); |
| 300 virtual void Release() = 0; | 300 virtual void Release() = 0; |
| 301 | 301 |
| 302 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; | 302 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; |
| 303 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) = 0; | 303 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, const FX_CHAR* face, int& iExact) = 0; |
| 304 virtual void* GetFont(const FX_CHAR* face) = 0; | 304 virtual void* GetFont(const FX_CHAR* face) = 0; |
| 305 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer
, FX_DWORD size) = 0; | 305 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer
, FX_DWORD size) = 0; |
| 306 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) =
0; | 306 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) =
0; |
| 307 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; | 307 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; |
| 308 virtual int GetFaceIndex(void* hFont) | 308 virtual int GetFaceIndex(void* hFont) |
| 309 { | 309 { |
| 310 return 0; | 310 return 0; |
| 311 } | 311 } |
| 312 virtual void DeleteFont(void* hFont) = 0; | 312 virtual void DeleteFont(void* hFont) = 0; |
| 313 virtual void* RetainFont(void* hFont) | 313 virtual void* RetainFont(void* hFont) |
| 314 { | 314 { |
| 315 return NULL; | 315 return NULL; |
| 316 } | 316 } |
| 317 protected: | 317 protected: |
| 318 ~IFX_SystemFontInfo() { } | 318 ~IFX_SystemFontInfo() { } |
| 319 }; | 319 }; |
| 320 class CFX_FolderFontInfo : public IFX_SystemFontInfo | 320 class CFX_FolderFontInfo : public IFX_SystemFontInfo |
| 321 { | 321 { |
| 322 public: | 322 public: |
| 323 CFX_FolderFontInfo(); | 323 CFX_FolderFontInfo(); |
| 324 virtual ~CFX_FolderFontInfo(); | 324 virtual ~CFX_FolderFontInfo(); |
| 325 void» » » » AddPath(const CFX_ByteStringC& path); | 325 void AddPath(const CFX_ByteStringC& path); |
| 326 virtual void» » Release(); | 326 |
| 327 virtual» FX_BOOL»» EnumFontList(CFX_FontMapper* pMapper); | 327 // IFX_SytemFontInfo: |
| 328 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact); | 328 void Release() override; |
| 329 virtual void*» » GetFont(const FX_CHAR* face); | 329 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; |
| 330 virtual FX_DWORD» GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer
, FX_DWORD size); | 330 void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, |
| 331 virtual void» » DeleteFont(void* hFont); | 331 const FX_CHAR* face, int& bExact) override; |
| 332 virtual» FX_BOOL»» GetFaceName(void* hFont, CFX_ByteString& name); | 332 void* GetFont(const FX_CHAR* face) override; |
| 333 virtual FX_BOOL» » GetFontCharset(void* hFont, int& charset); | 333 FX_DWORD GetFontData(void* hFont, FX_DWORD table, |
| 334 uint8_t* buffer, FX_DWORD size) override; |
| 335 void DeleteFont(void* hFont) override; |
| 336 FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override; |
| 337 FX_BOOL GetFontCharset(void* hFont, int& charset) override; |
| 338 |
| 334 protected: | 339 protected: |
| 335 CFX_MapByteStringToPtr m_FontList; | 340 CFX_MapByteStringToPtr m_FontList; |
| 336 CFX_ByteStringArray m_PathList; | 341 CFX_ByteStringArray m_PathList; |
| 337 CFX_FontMapper* m_pMapper; | 342 CFX_FontMapper* m_pMapper; |
| 338 void ScanPath(CFX_ByteString& path); | 343 void ScanPath(CFX_ByteString& path); |
| 339 void ScanFile(CFX_ByteString& path); | 344 void ScanFile(CFX_ByteString& path); |
| 340 void ReportFace(CFX_ByteString& path, FXSYS_F
ILE* pFile, FX_DWORD filesize, FX_DWORD offset); | 345 void ReportFace(CFX_ByteString& path, FXSYS_F
ILE* pFile, FX_DWORD filesize, FX_DWORD offset); |
| 341 }; | 346 }; |
| 342 class CFX_CountedFaceCache | 347 class CFX_CountedFaceCache |
| 343 { | 348 { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); | 424 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); |
| 420 class IFX_GSUBTable | 425 class IFX_GSUBTable |
| 421 { | 426 { |
| 422 public: | 427 public: |
| 423 static IFX_GSUBTable* Create(CFX_Font* pFont); | 428 static IFX_GSUBTable* Create(CFX_Font* pFont); |
| 424 virtual ~IFX_GSUBTable() { } | 429 virtual ~IFX_GSUBTable() { } |
| 425 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; | 430 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; |
| 426 }; | 431 }; |
| 427 | 432 |
| 428 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 433 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |