| 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_H_ | 7 #ifndef _FX_FONT_H_ |
| 8 #define _FX_FONT_H_ | 8 #define _FX_FONT_H_ |
| 9 #ifndef _FXCRT_EXTENSION_ | 9 #ifndef _FXCRT_EXTENSION_ |
| 10 #include "../../include/fxcrt/fx_ext.h" | 10 #include "../../include/fxcrt/fx_ext.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 virtual ~IFX_FontMapper() {} | 236 virtual ~IFX_FontMapper() {} |
| 237 | 237 |
| 238 virtual FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL b
TrueType, FX_DWORD flags, | 238 virtual FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL b
TrueType, FX_DWORD flags, |
| 239 int weight, int italic_angle, int CharsetC
P, CFX_SubstFont* pSubstFont) = 0; | 239 int weight, int italic_angle, int CharsetC
P, CFX_SubstFont* pSubstFont) = 0; |
| 240 | 240 |
| 241 CFX_FontMgr* m_pFontMgr; | 241 CFX_FontMgr* m_pFontMgr; |
| 242 }; | 242 }; |
| 243 class IFX_FontEnumerator | 243 class IFX_FontEnumerator |
| 244 { | 244 { |
| 245 public: | 245 public: |
| 246 virtual ~IFX_FontEnumerator() { } |
| 246 | 247 |
| 247 virtual void HitFont() = 0; | 248 virtual void HitFont() = 0; |
| 248 | 249 |
| 249 virtual void Finish() = 0; | 250 virtual void Finish() = 0; |
| 250 }; | 251 }; |
| 251 class IFX_AdditionalFontEnum | 252 class IFX_AdditionalFontEnum |
| 252 { | 253 { |
| 253 public: | 254 public: |
| 255 virtual ~IFX_AdditionalFontEnum() { } |
| 254 virtual int CountFiles() = 0; | 256 virtual int CountFiles() = 0; |
| 255 virtual IFX_FileStream* GetFontFile(int index) = 0; | 257 virtual IFX_FileStream* GetFontFile(int index) = 0; |
| 256 }; | 258 }; |
| 257 class CFX_FontMapper : public IFX_FontMapper | 259 class CFX_FontMapper : public IFX_FontMapper |
| 258 { | 260 { |
| 259 public: | 261 public: |
| 260 CFX_FontMapper(); | 262 CFX_FontMapper(); |
| 261 virtual ~CFX_FontMapper(); | 263 virtual ~CFX_FontMapper(); |
| 262 void SetSystemFontInfo(IFX_SystemFontInfo* pF
ontInfo); | 264 void SetSystemFontInfo(IFX_SystemFontInfo* pF
ontInfo); |
| 263 IFX_SystemFontInfo* GetSystemFontInfo() | 265 IFX_SystemFontInfo* GetSystemFontInfo() |
| (...skipping 25 matching lines...) Expand all Loading... |
| 289 CFX_ByteStringArray m_FaceArray; | 291 CFX_ByteStringArray m_FaceArray; |
| 290 IFX_SystemFontInfo* m_pFontInfo; | 292 IFX_SystemFontInfo* m_pFontInfo; |
| 291 FXFT_Face m_FoxitFaces[14]; | 293 FXFT_Face m_FoxitFaces[14]; |
| 292 IFX_FontEnumerator* m_pFontEnumerator; | 294 IFX_FontEnumerator* m_pFontEnumerator; |
| 293 }; | 295 }; |
| 294 class IFX_SystemFontInfo : public CFX_Object | 296 class IFX_SystemFontInfo : public CFX_Object |
| 295 { | 297 { |
| 296 public: | 298 public: |
| 297 static IFX_SystemFontInfo* CreateDefault(); | 299 static IFX_SystemFontInfo* CreateDefault(); |
| 298 virtual void Release() = 0; | 300 virtual void Release() = 0; |
| 301 |
| 299 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; | 302 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; |
| 300 virtual void* MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0; | 303 virtual void* MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0; |
| 301 virtual void* GetFont(FX_LPCSTR face) = 0; | 304 virtual void* GetFont(FX_LPCSTR face) = 0; |
| 302 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffe
r, FX_DWORD size) = 0; | 305 virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffe
r, FX_DWORD size) = 0; |
| 303 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) =
0; | 306 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) =
0; |
| 304 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; | 307 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; |
| 305 virtual int GetFaceIndex(void* hFont) | 308 virtual int GetFaceIndex(void* hFont) |
| 306 { | 309 { |
| 307 return 0; | 310 return 0; |
| 308 } | 311 } |
| 309 virtual void DeleteFont(void* hFont) = 0; | 312 virtual void DeleteFont(void* hFont) = 0; |
| 310 virtual void* RetainFont(void* hFont) | 313 virtual void* RetainFont(void* hFont) |
| 311 { | 314 { |
| 312 return NULL; | 315 return NULL; |
| 313 } | 316 } |
| 317 protected: |
| 318 ~IFX_SystemFontInfo() { } |
| 314 }; | 319 }; |
| 315 class CFX_FolderFontInfo : public IFX_SystemFontInfo | 320 class CFX_FolderFontInfo : public IFX_SystemFontInfo |
| 316 { | 321 { |
| 317 public: | 322 public: |
| 318 CFX_FolderFontInfo(); | 323 CFX_FolderFontInfo(); |
| 319 virtual ~CFX_FolderFontInfo(); | 324 virtual ~CFX_FolderFontInfo(); |
| 320 void AddPath(FX_BSTR path); | 325 void AddPath(FX_BSTR path); |
| 321 virtual void Release(); | 326 virtual void Release(); |
| 322 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper); | 327 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper); |
| 323 virtual void* MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact); | 328 virtual void* MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); | 421 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); |
| 417 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 422 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
| 418 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); | 423 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); |
| 419 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 424 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
| 420 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); | 425 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); |
| 421 class IFX_GSUBTable | 426 class IFX_GSUBTable |
| 422 { | 427 { |
| 423 public: | 428 public: |
| 424 virtual void Release() = 0; | 429 virtual void Release() = 0; |
| 425 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; | 430 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; |
| 431 |
| 432 protected: |
| 433 ~IFX_GSUBTable() { } |
| 426 }; | 434 }; |
| 427 IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont); | 435 IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont); |
| 428 #endif | 436 #endif |
| OLD | NEW |