| 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_FXGE_INCLUDE_FX_FONT_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_FONT_H_ |
| 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ | 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CFX_Font(); | 70 CFX_Font(); |
| 71 ~CFX_Font(); | 71 ~CFX_Font(); |
| 72 | 72 |
| 73 void LoadSubst(const CFX_ByteString& face_name, | 73 void LoadSubst(const CFX_ByteString& face_name, |
| 74 FX_BOOL bTrueType, | 74 FX_BOOL bTrueType, |
| 75 uint32_t flags, | 75 uint32_t flags, |
| 76 int weight, | 76 int weight, |
| 77 int italic_angle, | 77 int italic_angle, |
| 78 int CharsetCP, | 78 int CharsetCP, |
| 79 FX_BOOL bVertical = FALSE); | 79 FX_BOOL bVertical = FALSE); |
| 80 |
| 80 FX_BOOL LoadEmbedded(const uint8_t* data, uint32_t size); | 81 FX_BOOL LoadEmbedded(const uint8_t* data, uint32_t size); |
| 81 FXFT_Face GetFace() const { return m_Face; } | 82 FXFT_Face GetFace() const { return m_Face; } |
| 83 CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } |
| 82 | 84 |
| 83 #ifdef PDF_ENABLE_XFA | 85 #ifdef PDF_ENABLE_XFA |
| 84 FX_BOOL LoadFile(IFX_FileRead* pFile, | 86 FX_BOOL LoadFile(IFX_FileRead* pFile, |
| 85 int nFaceIndex = 0, | 87 int nFaceIndex = 0, |
| 86 int* pFaceCount = nullptr); | 88 int* pFaceCount = nullptr); |
| 87 | 89 |
| 88 FX_BOOL LoadClone(const CFX_Font* pFont); | 90 FX_BOOL LoadClone(const CFX_Font* pFont); |
| 89 CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } | |
| 90 void SetFace(FXFT_Face face) { m_Face = face; } | 91 void SetFace(FXFT_Face face) { m_Face = face; } |
| 91 void SetSubstFont(CFX_SubstFont* subst) { m_pSubstFont = subst; } | 92 void SetSubstFont(CFX_SubstFont* subst) { m_pSubstFont = subst; } |
| 92 #else // PDF_ENABLE_XFA | |
| 93 const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } | |
| 94 #endif // PDF_ENABLE_XFA | 93 #endif // PDF_ENABLE_XFA |
| 95 | 94 |
| 96 CFX_PathData* LoadGlyphPath(uint32_t glyph_index, int dest_width = 0); | 95 CFX_PathData* LoadGlyphPath(uint32_t glyph_index, int dest_width = 0); |
| 97 int GetGlyphWidth(uint32_t glyph_index); | 96 int GetGlyphWidth(uint32_t glyph_index); |
| 98 int GetAscent() const; | 97 int GetAscent() const; |
| 99 int GetDescent() const; | 98 int GetDescent() const; |
| 100 FX_BOOL GetGlyphBBox(uint32_t glyph_index, FX_RECT& bbox); | 99 FX_BOOL GetGlyphBBox(uint32_t glyph_index, FX_RECT& bbox); |
| 101 FX_BOOL IsItalic() const; | 100 FX_BOOL IsItalic() const; |
| 102 FX_BOOL IsBold() const; | 101 FX_BOOL IsBold() const; |
| 103 FX_BOOL IsFixedWidth() const; | 102 FX_BOOL IsFixedWidth() const; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 FX_FLOAT retinaScaleX = 1.0f, | 536 FX_FLOAT retinaScaleX = 1.0f, |
| 538 FX_FLOAT retinaScaleY = 1.0f); | 537 FX_FLOAT retinaScaleY = 1.0f); |
| 539 | 538 |
| 540 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 539 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
| 541 uint32_t name_table_size, | 540 uint32_t name_table_size, |
| 542 uint32_t name); | 541 uint32_t name); |
| 543 | 542 |
| 544 int PDF_GetStandardFontName(CFX_ByteString* name); | 543 int PDF_GetStandardFontName(CFX_ByteString* name); |
| 545 | 544 |
| 546 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 545 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
| OLD | NEW |