| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 FXFT_Face m_Face; | 396 FXFT_Face m_Face; |
| 397 CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
x, FX_BOOL bFontStyle, | 397 CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
x, FX_BOOL bFontStyle, |
| 398 const CFX_AffineMatrix* pMatrix, int des
t_width, int anti_alias); | 398 const CFX_AffineMatrix* pMatrix, int des
t_width, int anti_alias); |
| 399 CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont, FX_DWORD
glyph_index, | 399 CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont, FX_DWORD
glyph_index, |
| 400 const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias); | 400 const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias); |
| 401 CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont, const CFX_AffineM
atrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey, | 401 CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont, const CFX_AffineM
atrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey, |
| 402 FX_DWORD glyph_index, FX_BOOL bFontStyle, int dest_width, int anti_a
lias); | 402 FX_DWORD glyph_index, FX_BOOL bFontStyle, int dest_width, int anti_a
lias); |
| 403 CFX_MapByteStringToPtr m_SizeMap; | 403 CFX_MapByteStringToPtr m_SizeMap; |
| 404 CFX_MapPtrToPtr m_PathMap; | 404 CFX_MapPtrToPtr m_PathMap; |
| 405 CFX_DIBitmap* m_pBitmap; | 405 CFX_DIBitmap* m_pBitmap; |
| 406 void* m_pPlatformGraphics; | |
| 407 void* m_pPlatformBitmap; | |
| 408 void* m_hDC; | |
| 409 void* m_hBitmap; | |
| 410 void* m_hOldBitmap; | |
| 411 void* m_hGdiFont; | |
| 412 void* m_hOldGdiFont; | |
| 413 | 406 |
| 414 void InitPlatform(); | 407 void InitPlatform(); |
| 415 void DestroyPlatform(); | 408 void DestroyPlatform(); |
| 416 }; | 409 }; |
| 417 typedef struct { | 410 typedef struct { |
| 418 const CFX_GlyphBitmap* m_pGlyph; | 411 const CFX_GlyphBitmap* m_pGlyph; |
| 419 int m_OriginX, m_OriginY; | 412 int m_OriginX, m_OriginY; |
| 420 FX_FLOAT m_fOriginX, m_fOriginY; | 413 FX_FLOAT m_fOriginX, m_fOriginY; |
| 421 } FXTEXT_GLYPHPOS; | 414 } FXTEXT_GLYPHPOS; |
| 422 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); | 415 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); |
| 423 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 416 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
| 424 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); | 417 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); |
| 425 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 418 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
| 426 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); | 419 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); |
| 427 class IFX_GSUBTable | 420 class IFX_GSUBTable |
| 428 { | 421 { |
| 429 public: | 422 public: |
| 430 static IFX_GSUBTable* Create(CFX_Font* pFont); | 423 static IFX_GSUBTable* Create(CFX_Font* pFont); |
| 431 virtual ~IFX_GSUBTable() { } | 424 virtual ~IFX_GSUBTable() { } |
| 432 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; | 425 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; |
| 433 }; | 426 }; |
| 434 | 427 |
| 435 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 428 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |