Chromium Code Reviews| Index: core/include/fxge/fx_font.h |
| diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h |
| index 8e0f5a1615d99d6d149bf5f2004e58bd2ec267c5..bec75bc9a7adb13e70f37731dea82a3c43c3d55b 100644 |
| --- a/core/include/fxge/fx_font.h |
| +++ b/core/include/fxge/fx_font.h |
| @@ -49,6 +49,7 @@ class IFX_SystemFontInfo; |
| #define FXFONT_FF_SCRIPT (4 << 4) |
| #define FXFONT_FW_NORMAL 400 |
| #define FXFONT_FW_BOLD 700 |
| + |
| class CFX_Font { |
| public: |
| CFX_Font(); |
| @@ -64,8 +65,6 @@ class CFX_Font { |
| FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); |
|
Tom Sepez
2015/08/17 18:38:01
nit: maybe kill the doublespacing between decls in
Lei Zhang
2015/08/18 06:10:53
Done.
|
| - FX_BOOL LoadFile(IFX_FileRead* pFile); |
| - |
| FXFT_Face GetFace() const { return m_Face; } |
| const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } |
| @@ -80,11 +79,11 @@ class CFX_Font { |
| FX_BOOL GetGlyphBBox(FX_DWORD glyph_index, FX_RECT& bbox); |
| - FX_BOOL IsItalic(); |
| + FX_BOOL IsItalic() const; |
| - FX_BOOL IsBold(); |
| + FX_BOOL IsBold() const; |
| - FX_BOOL IsFixedWidth(); |
| + FX_BOOL IsFixedWidth() const; |
| FX_BOOL IsVertical() const { return m_bVertical; } |
| @@ -94,24 +93,32 @@ class CFX_Font { |
| CFX_ByteString GetFaceName() const; |
| - FX_BOOL IsTTFont(); |
| + FX_BOOL IsTTFont() const; |
| FX_BOOL GetBBox(FX_RECT& bbox); |
| - int GetHeight(); |
| + int GetHeight() const; |
| - int GetULPos(); |
| + int GetULPos() const; |
| - int GetULthickness(); |
| + int GetULthickness() const; |
| - int GetMaxAdvanceWidth(); |
| + int GetMaxAdvanceWidth() const; |
| - FXFT_Face m_Face; |
| + FX_BOOL IsEmbedded() const { return m_bEmbedded; } |
| - CFX_SubstFont* m_pSubstFont; |
| - FX_BOOL IsEmbedded() { return m_bEmbedded; } |
| + uint8_t* GetSubData() const { return m_pGsubData; } |
| + void SetSubData(uint8_t* data) { m_pGsubData = data; } |
| void AdjustMMParams(int glyph_index, int width, int weight); |
| + |
| + private: |
| + void ReleasePlatformResource(); |
| + |
| + void DeleteFace(); |
| + |
| + FXFT_Face m_Face; |
| + CFX_SubstFont* m_pSubstFont; |
| uint8_t* m_pFontDataAllocation; |
| uint8_t* m_pFontData; |
| uint8_t* m_pGsubData; |
| @@ -122,15 +129,10 @@ class CFX_Font { |
| void* m_pPlatformFontCollection; |
| void* m_pDwFont; |
| FX_BOOL m_bDwLoaded; |
| - void ReleasePlatformResource(); |
| - |
| - void DeleteFace(); |
| - |
| - protected: |
| FX_BOOL m_bEmbedded; |
| FX_BOOL m_bVertical; |
| - void* m_pOwnedStream; |
| }; |
| + |
| #define ENCODING_INTERNAL 0 |
| #define ENCODING_UNICODE 1 |