| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, | 273 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, |
| 274 FX_BOOL bTrueType, | 274 FX_BOOL bTrueType, |
| 275 uint32_t flags, | 275 uint32_t flags, |
| 276 int weight, | 276 int weight, |
| 277 int italic_angle, | 277 int italic_angle, |
| 278 int CharsetCP, | 278 int CharsetCP, |
| 279 CFX_SubstFont* pSubstFont); | 279 CFX_SubstFont* pSubstFont); |
| 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 bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; } |
| 283 | 284 |
| 284 private: | 285 private: |
| 285 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; | 286 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; |
| 286 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; | 287 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; |
| 287 FXFT_Library m_FTLibrary; | 288 FXFT_Library m_FTLibrary; |
| 289 bool m_FTLibrarySupportsHinting; |
| 288 }; | 290 }; |
| 289 | 291 |
| 290 class CFX_FontMapper { | 292 class CFX_FontMapper { |
| 291 public: | 293 public: |
| 292 explicit CFX_FontMapper(CFX_FontMgr* mgr); | 294 explicit CFX_FontMapper(CFX_FontMgr* mgr); |
| 293 ~CFX_FontMapper(); | 295 ~CFX_FontMapper(); |
| 294 | 296 |
| 295 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); | 297 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); |
| 296 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } | 298 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } |
| 297 void AddInstalledFont(const CFX_ByteString& name, int charset); | 299 void AddInstalledFont(const CFX_ByteString& name, int charset); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 FX_FLOAT retinaScaleX = 1.0f, | 534 FX_FLOAT retinaScaleX = 1.0f, |
| 533 FX_FLOAT retinaScaleY = 1.0f); | 535 FX_FLOAT retinaScaleY = 1.0f); |
| 534 | 536 |
| 535 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 537 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
| 536 uint32_t name_table_size, | 538 uint32_t name_table_size, |
| 537 uint32_t name); | 539 uint32_t name); |
| 538 | 540 |
| 539 int PDF_GetStandardFontName(CFX_ByteString* name); | 541 int PDF_GetStandardFontName(CFX_ByteString* name); |
| 540 | 542 |
| 541 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 543 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
| OLD | NEW |