| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 IFX_FontEnumerator* GetFontEnumerator() const { return m_pFontEnumerator; } | 255 IFX_FontEnumerator* GetFontEnumerator() const { return m_pFontEnumerator; } |
| 256 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, | 256 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, |
| 257 FX_BOOL bTrueType, | 257 FX_BOOL bTrueType, |
| 258 FX_DWORD flags, | 258 FX_DWORD flags, |
| 259 int weight, | 259 int weight, |
| 260 int italic_angle, | 260 int italic_angle, |
| 261 int CharsetCP, | 261 int CharsetCP, |
| 262 CFX_SubstFont* pSubstFont); | 262 CFX_SubstFont* pSubstFont); |
| 263 | 263 |
| 264 private: | 264 private: |
| 265 static const size_t MM_FACE_COUNT = 2; |
| 266 static const size_t FOXIT_FACE_COUNT = 14; |
| 267 |
| 265 CFX_ByteString GetPSNameFromTT(void* hFont); | 268 CFX_ByteString GetPSNameFromTT(void* hFont); |
| 266 CFX_ByteString MatchInstalledFonts(const CFX_ByteString& norm_name); | 269 CFX_ByteString MatchInstalledFonts(const CFX_ByteString& norm_name); |
| 267 FXFT_Face UseInternalSubst(CFX_SubstFont* pSubstFont, | 270 FXFT_Face UseInternalSubst(CFX_SubstFont* pSubstFont, |
| 268 int iBaseFont, | 271 int iBaseFont, |
| 269 int italic_angle, | 272 int italic_angle, |
| 270 int weight, | 273 int weight, |
| 271 int picthfamily); | 274 int picthfamily); |
| 272 | 275 |
| 273 FX_BOOL m_bListLoaded; | 276 FX_BOOL m_bListLoaded; |
| 274 FXFT_Face m_MMFaces[2]; | 277 FXFT_Face m_MMFaces[MM_FACE_COUNT]; |
| 275 CFX_ByteString m_LastFamily; | 278 CFX_ByteString m_LastFamily; |
| 276 CFX_DWordArray m_CharsetArray; | 279 CFX_DWordArray m_CharsetArray; |
| 277 CFX_ByteStringArray m_FaceArray; | 280 CFX_ByteStringArray m_FaceArray; |
| 278 IFX_SystemFontInfo* m_pFontInfo; | 281 IFX_SystemFontInfo* m_pFontInfo; |
| 279 FXFT_Face m_FoxitFaces[14]; | 282 FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT]; |
| 280 IFX_FontEnumerator* m_pFontEnumerator; | 283 IFX_FontEnumerator* m_pFontEnumerator; |
| 281 CFX_FontMgr* const m_pFontMgr; | 284 CFX_FontMgr* const m_pFontMgr; |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 class IFX_SystemFontInfo { | 287 class IFX_SystemFontInfo { |
| 285 public: | 288 public: |
| 286 static IFX_SystemFontInfo* CreateDefault(const char** pUserPaths); | 289 static IFX_SystemFontInfo* CreateDefault(const char** pUserPaths); |
| 287 virtual void Release() = 0; | 290 virtual void Release() = 0; |
| 288 | 291 |
| 289 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; | 292 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 448 |
| 446 protected: | 449 protected: |
| 447 virtual ~IFX_GSUBTable() {} | 450 virtual ~IFX_GSUBTable() {} |
| 448 }; | 451 }; |
| 449 | 452 |
| 450 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); | 453 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); |
| 451 | 454 |
| 452 int PDF_GetStandardFontName(CFX_ByteString* name); | 455 int PDF_GetStandardFontName(CFX_ByteString* name); |
| 453 | 456 |
| 454 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 457 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |