| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #define FXFONT_FF_ROMAN (1 << 4) | 53 #define FXFONT_FF_ROMAN (1 << 4) |
| 54 #define FXFONT_FF_SCRIPT (4 << 4) | 54 #define FXFONT_FF_SCRIPT (4 << 4) |
| 55 #define FXFONT_FW_NORMAL 400 | 55 #define FXFONT_FW_NORMAL 400 |
| 56 #define FXFONT_FW_BOLD 700 | 56 #define FXFONT_FW_BOLD 700 |
| 57 | 57 |
| 58 class CFX_Font { | 58 class CFX_Font { |
| 59 public: | 59 public: |
| 60 CFX_Font(); | 60 CFX_Font(); |
| 61 ~CFX_Font(); | 61 ~CFX_Font(); |
| 62 | 62 |
| 63 FX_BOOL LoadSubst(const CFX_ByteString& face_name, | 63 void LoadSubst(const CFX_ByteString& face_name, |
| 64 FX_BOOL bTrueType, | 64 FX_BOOL bTrueType, |
| 65 FX_DWORD flags, | 65 FX_DWORD flags, |
| 66 int weight, | 66 int weight, |
| 67 int italic_angle, | 67 int italic_angle, |
| 68 int CharsetCP, | 68 int CharsetCP, |
| 69 FX_BOOL bVertical = FALSE); | 69 FX_BOOL bVertical = FALSE); |
| 70 FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); | 70 FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); |
| 71 FXFT_Face GetFace() const { return m_Face; } | 71 FXFT_Face GetFace() const { return m_Face; } |
| 72 const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } | 72 const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } |
| 73 CFX_PathData* LoadGlyphPath(FX_DWORD glyph_index, int dest_width = 0); | 73 CFX_PathData* LoadGlyphPath(FX_DWORD glyph_index, int dest_width = 0); |
| 74 int GetGlyphWidth(FX_DWORD glyph_index); | 74 int GetGlyphWidth(FX_DWORD glyph_index); |
| 75 int GetAscent() const; | 75 int GetAscent() const; |
| 76 int GetDescent() const; | 76 int GetDescent() const; |
| 77 FX_BOOL GetGlyphBBox(FX_DWORD glyph_index, FX_RECT& bbox); | 77 FX_BOOL GetGlyphBBox(FX_DWORD glyph_index, FX_RECT& bbox); |
| 78 FX_BOOL IsItalic() const; | 78 FX_BOOL IsItalic() const; |
| 79 FX_BOOL IsBold() const; | 79 FX_BOOL IsBold() const; |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 static IFX_GSUBTable* Create(CFX_Font* pFont); | 432 static IFX_GSUBTable* Create(CFX_Font* pFont); |
| 433 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; | 433 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; |
| 434 | 434 |
| 435 protected: | 435 protected: |
| 436 virtual ~IFX_GSUBTable() {} | 436 virtual ~IFX_GSUBTable() {} |
| 437 }; | 437 }; |
| 438 | 438 |
| 439 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); | 439 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); |
| 440 | 440 |
| 441 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 441 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |