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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 FXFT_Face m_Face; | 437 FXFT_Face m_Face; |
438 CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
x, FX_BOOL bFontStyle, | 438 CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
x, FX_BOOL bFontStyle, |
439 const CFX_AffineMatrix* pMatrix, int des
t_width, int anti_alias); | 439 const CFX_AffineMatrix* pMatrix, int des
t_width, int anti_alias); |
440 CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont, FX_DWORD
glyph_index, | 440 CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont, FX_DWORD
glyph_index, |
441 const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias); | 441 const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias); |
442 CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont, const CFX_AffineM
atrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey, | 442 CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont, const CFX_AffineM
atrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey, |
443 FX_DWORD glyph_index, FX_BOOL bFontStyle, int dest_width, int anti_a
lias); | 443 FX_DWORD glyph_index, FX_BOOL bFontStyle, int dest_width, int anti_a
lias); |
444 CFX_MapByteStringToPtr m_SizeMap; | 444 CFX_MapByteStringToPtr m_SizeMap; |
445 CFX_MapPtrToPtr m_PathMap; | 445 CFX_MapPtrToPtr m_PathMap; |
446 CFX_DIBitmap* m_pBitmap; | 446 CFX_DIBitmap* m_pBitmap; |
447 void* m_pPlatformGraphics; | |
448 void* m_pPlatformBitmap; | |
449 void* m_hDC; | |
450 void* m_hBitmap; | |
451 void* m_hOldBitmap; | |
452 void* m_hGdiFont; | |
453 void* m_hOldGdiFont; | |
454 | 447 |
455 void InitPlatform(); | 448 void InitPlatform(); |
456 void DestroyPlatform(); | 449 void DestroyPlatform(); |
457 }; | 450 }; |
458 typedef struct { | 451 typedef struct { |
459 const CFX_GlyphBitmap* m_pGlyph; | 452 const CFX_GlyphBitmap* m_pGlyph; |
460 int m_OriginX, m_OriginY; | 453 int m_OriginX, m_OriginY; |
461 FX_FLOAT m_fOriginX, m_fOriginY; | 454 FX_FLOAT m_fOriginX, m_fOriginY; |
462 } FXTEXT_GLYPHPOS; | 455 } FXTEXT_GLYPHPOS; |
463 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); | 456 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_a
lias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); |
464 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 457 FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
465 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); | 458 CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsign
ed long argb); |
466 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, | 459 FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, |
467 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); | 460 CFX_AffineMatrix* pText_matrix, unsigned short const* text, u
nsigned long argb); |
468 class IFX_GSUBTable | 461 class IFX_GSUBTable |
469 { | 462 { |
470 public: | 463 public: |
471 static IFX_GSUBTable* Create(CFX_Font* pFont); | 464 static IFX_GSUBTable* Create(CFX_Font* pFont); |
472 virtual ~IFX_GSUBTable() { } | 465 virtual ~IFX_GSUBTable() { } |
473 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; | 466 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0
; |
474 }; | 467 }; |
475 | 468 |
476 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 469 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
OLD | NEW |