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 _FX_FONT | 7 #ifndef _FX_FONT |
8 #define _FX_FONT | 8 #define _FX_FONT |
9 class IFX_Font; | 9 class IFX_Font; |
10 class IFX_FontMgr; | 10 class IFX_FontMgr; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 FX_LPEnumAllFonts FX_GetDefFontEnumerator(); | 131 FX_LPEnumAllFonts FX_GetDefFontEnumerator(); |
132 typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, | 132 typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, |
133 const CFX_FontDescriptors& fonts, | 133 const CFX_FontDescriptors& fonts, |
134 void* pUserData); | 134 void* pUserData); |
135 FX_LPMatchFont FX_GetDefFontMatchor(); | 135 FX_LPMatchFont FX_GetDefFontMatchor(); |
136 class IFX_FontMgr { | 136 class IFX_FontMgr { |
137 public: | 137 public: |
138 static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, | 138 static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, |
139 FX_LPMatchFont pMatcher = NULL, | 139 FX_LPMatchFont pMatcher = NULL, |
140 void* pUserData = NULL); | 140 void* pUserData = NULL); |
141 ~virtual ~IFX_FontMgr() {} | 141 virtual ~IFX_FontMgr() {} |
142 virtual void Release() = 0; | 142 virtual void Release() = 0; |
143 virtual IFX_Font* GetDefFontByCodePage( | 143 virtual IFX_Font* GetDefFontByCodePage( |
144 FX_WORD wCodePage, | 144 FX_WORD wCodePage, |
145 FX_DWORD dwFontStyles, | 145 FX_DWORD dwFontStyles, |
146 const FX_WCHAR* pszFontFamily = NULL) = 0; | 146 const FX_WCHAR* pszFontFamily = NULL) = 0; |
147 virtual IFX_Font* GetDefFontByCharset( | 147 virtual IFX_Font* GetDefFontByCharset( |
148 uint8_t nCharset, | 148 uint8_t nCharset, |
149 FX_DWORD dwFontStyles, | 149 FX_DWORD dwFontStyles, |
150 const FX_WCHAR* pszFontFamily = NULL) = 0; | 150 const FX_WCHAR* pszFontFamily = NULL) = 0; |
151 virtual IFX_Font* GetDefFontByUnicode( | 151 virtual IFX_Font* GetDefFontByUnicode( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 virtual IFX_Font* LoadFont(IFX_Stream* pFontStream, | 255 virtual IFX_Font* LoadFont(IFX_Stream* pFontStream, |
256 int32_t iFaceIndex, | 256 int32_t iFaceIndex, |
257 int32_t* pFaceCount = NULL, | 257 int32_t* pFaceCount = NULL, |
258 FX_BOOL bSaveStream = FALSE) = 0; | 258 FX_BOOL bSaveStream = FALSE) = 0; |
259 | 259 |
260 virtual void ClearFontCache() = 0; | 260 virtual void ClearFontCache() = 0; |
261 virtual void RemoveFont(IFX_Font* pFont) = 0; | 261 virtual void RemoveFont(IFX_Font* pFont) = 0; |
262 }; | 262 }; |
263 #endif | 263 #endif |
264 #endif | 264 #endif |
OLD | NEW |