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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 FX_DWORD flags, | 205 FX_DWORD flags, |
206 int weight, | 206 int weight, |
207 int italic_angle, | 207 int italic_angle, |
208 int CharsetCP, | 208 int CharsetCP, |
209 CFX_SubstFont* pSubstFont); | 209 CFX_SubstFont* pSubstFont); |
210 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, FX_DWORD* size); | 210 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, FX_DWORD* size); |
211 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } | 211 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } |
212 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } | 212 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } |
213 | 213 |
214 private: | 214 private: |
215 nonstd::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; | 215 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; |
216 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; | 216 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; |
217 FXFT_Library m_FTLibrary; | 217 FXFT_Library m_FTLibrary; |
218 }; | 218 }; |
219 | 219 |
220 class IFX_FontEnumerator { | 220 class IFX_FontEnumerator { |
221 public: | 221 public: |
222 virtual void HitFont() = 0; | 222 virtual void HitFont() = 0; |
223 | 223 |
224 virtual void Finish() = 0; | 224 virtual void Finish() = 0; |
225 | 225 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 | 449 |
450 protected: | 450 protected: |
451 virtual ~IFX_GSUBTable() {} | 451 virtual ~IFX_GSUBTable() {} |
452 }; | 452 }; |
453 | 453 |
454 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); | 454 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); |
455 | 455 |
456 int PDF_GetStandardFontName(CFX_ByteString* name); | 456 int PDF_GetStandardFontName(CFX_ByteString* name); |
457 | 457 |
458 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 458 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
OLD | NEW |