| 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_FIXEDPITCH 1 | 53 #define FXFONT_FF_FIXEDPITCH 1 |
| 54 #define FXFONT_FF_ROMAN (1 << 4) | 54 #define FXFONT_FF_ROMAN (1 << 4) |
| 55 #define FXFONT_FF_SCRIPT (4 << 4) | 55 #define FXFONT_FF_SCRIPT (4 << 4) |
| 56 #define FXFONT_FW_NORMAL 400 | 56 #define FXFONT_FW_NORMAL 400 |
| 57 #define FXFONT_FW_BOLD 700 | 57 #define FXFONT_FW_BOLD 700 |
| 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 | |
| 71 FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); | 70 FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); |
| 72 | 71 |
| 73 FX_BOOL LoadFile(IFX_FileRead* pFile, | 72 FX_BOOL LoadFile(IFX_FileRead* pFile, |
| 74 int nFaceIndex = 0, | 73 int nFaceIndex = 0, |
| 75 int* pFaceCount = NULL); | 74 int* pFaceCount = NULL); |
| 76 | 75 |
| 77 FX_BOOL LoadClone(const CFX_Font* pFont); | 76 FX_BOOL LoadClone(const CFX_Font* pFont); |
| 78 | 77 |
| 79 FXFT_Face GetFace() const { return m_Face; } | 78 FXFT_Face GetFace() const { return m_Face; } |
| 80 | 79 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 static IFX_GSUBTable* Create(CFX_Font* pFont); | 512 static IFX_GSUBTable* Create(CFX_Font* pFont); |
| 514 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; | 513 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; |
| 515 | 514 |
| 516 protected: | 515 protected: |
| 517 virtual ~IFX_GSUBTable() {} | 516 virtual ~IFX_GSUBTable() {} |
| 518 }; | 517 }; |
| 519 | 518 |
| 520 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); | 519 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); |
| 521 | 520 |
| 522 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 521 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |