| 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_FXGE_INCLUDE_FX_FONT_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_FONT_H_ |
| 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ | 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); | 280 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); |
| 281 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } | 281 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } |
| 282 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } | 282 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } |
| 283 | 283 |
| 284 private: | 284 private: |
| 285 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; | 285 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; |
| 286 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; | 286 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; |
| 287 FXFT_Library m_FTLibrary; | 287 FXFT_Library m_FTLibrary; |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 class IFX_AdditionalFontEnum { | |
| 291 public: | |
| 292 virtual int CountFiles() = 0; | |
| 293 virtual IFX_FileStream* GetFontFile(int index) = 0; | |
| 294 | |
| 295 protected: | |
| 296 virtual ~IFX_AdditionalFontEnum() {} | |
| 297 }; | |
| 298 | |
| 299 class CFX_FontMapper { | 290 class CFX_FontMapper { |
| 300 public: | 291 public: |
| 301 explicit CFX_FontMapper(CFX_FontMgr* mgr); | 292 explicit CFX_FontMapper(CFX_FontMgr* mgr); |
| 302 ~CFX_FontMapper(); | 293 ~CFX_FontMapper(); |
| 303 | 294 |
| 304 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); | 295 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); |
| 305 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } | 296 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } |
| 306 void AddInstalledFont(const CFX_ByteString& name, int charset); | 297 void AddInstalledFont(const CFX_ByteString& name, int charset); |
| 307 void LoadInstalledFonts(); | 298 void LoadInstalledFonts(); |
| 308 | 299 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 virtual ~IFX_GSUBTable() {} | 535 virtual ~IFX_GSUBTable() {} |
| 545 }; | 536 }; |
| 546 | 537 |
| 547 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 538 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
| 548 uint32_t name_table_size, | 539 uint32_t name_table_size, |
| 549 uint32_t name); | 540 uint32_t name); |
| 550 | 541 |
| 551 int PDF_GetStandardFontName(CFX_ByteString* name); | 542 int PDF_GetStandardFontName(CFX_ByteString* name); |
| 552 | 543 |
| 553 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 544 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
| OLD | NEW |