| 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> |
| 11 #include <memory> |
| 11 | 12 |
| 12 #include "core/include/fxcrt/fx_system.h" | 13 #include "core/include/fxcrt/fx_system.h" |
| 13 #include "fx_dib.h" | 14 #include "fx_dib.h" |
| 14 #include "third_party/base/nonstd_unique_ptr.h" | |
| 15 | 15 |
| 16 typedef struct FT_FaceRec_* FXFT_Face; | 16 typedef struct FT_FaceRec_* FXFT_Face; |
| 17 typedef void* FXFT_Library; | 17 typedef void* FXFT_Library; |
| 18 | 18 |
| 19 class CFX_FaceCache; | 19 class CFX_FaceCache; |
| 20 class CFX_FontFaceInfo; | 20 class CFX_FontFaceInfo; |
| 21 class CFX_FontMapper; | 21 class CFX_FontMapper; |
| 22 class CFX_PathData; | 22 class CFX_PathData; |
| 23 class CFX_SizeGlyphCache; | 23 class CFX_SizeGlyphCache; |
| 24 class CFX_SubstFont; | 24 class CFX_SubstFont; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 FX_DWORD flags, | 266 FX_DWORD flags, |
| 267 int weight, | 267 int weight, |
| 268 int italic_angle, | 268 int italic_angle, |
| 269 int CharsetCP, | 269 int CharsetCP, |
| 270 CFX_SubstFont* pSubstFont); | 270 CFX_SubstFont* pSubstFont); |
| 271 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, FX_DWORD* size); | 271 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, FX_DWORD* size); |
| 272 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } | 272 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } |
| 273 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } | 273 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } |
| 274 | 274 |
| 275 private: | 275 private: |
| 276 nonstd::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; | 276 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; |
| 277 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; | 277 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; |
| 278 FXFT_Library m_FTLibrary; | 278 FXFT_Library m_FTLibrary; |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 class IFX_FontEnumerator { | 281 class IFX_FontEnumerator { |
| 282 public: | 282 public: |
| 283 virtual void HitFont() = 0; | 283 virtual void HitFont() = 0; |
| 284 | 284 |
| 285 virtual void Finish() = 0; | 285 virtual void Finish() = 0; |
| 286 | 286 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 530 |
| 531 protected: | 531 protected: |
| 532 virtual ~IFX_GSUBTable() {} | 532 virtual ~IFX_GSUBTable() {} |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); | 535 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); |
| 536 | 536 |
| 537 int PDF_GetStandardFontName(CFX_ByteString* name); | 537 int PDF_GetStandardFontName(CFX_ByteString* name); |
| 538 | 538 |
| 539 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 539 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |