Index: core/include/fxge/fx_font.h |
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h |
index 4111acee392bfa6d16d4544bcba164d82992ade8..04918ea2754c1af831e5a57be0b4420e63c63ad7 100644 |
--- a/core/include/fxge/fx_font.h |
+++ b/core/include/fxge/fx_font.h |
@@ -54,6 +54,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(); |
@@ -66,57 +67,38 @@ class CFX_Font { |
int italic_angle, |
int CharsetCP, |
FX_BOOL bVertical = FALSE); |
- |
FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); |
- |
- FX_BOOL LoadFile(IFX_FileRead* pFile); |
- |
FXFT_Face GetFace() const { return m_Face; } |
- |
const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } |
- |
CFX_PathData* LoadGlyphPath(FX_DWORD glyph_index, int dest_width = 0); |
- |
int GetGlyphWidth(FX_DWORD glyph_index); |
- |
int GetAscent() const; |
- |
int GetDescent() const; |
- |
FX_BOOL GetGlyphBBox(FX_DWORD glyph_index, FX_RECT& bbox); |
- |
- FX_BOOL IsItalic(); |
- |
- FX_BOOL IsBold(); |
- |
- FX_BOOL IsFixedWidth(); |
- |
+ FX_BOOL IsItalic() const; |
+ FX_BOOL IsBold() const; |
+ FX_BOOL IsFixedWidth() const; |
FX_BOOL IsVertical() const { return m_bVertical; } |
- |
CFX_WideString GetPsName() const; |
- |
CFX_ByteString GetFamilyName() const; |
- |
CFX_ByteString GetFaceName() const; |
- |
- FX_BOOL IsTTFont(); |
- |
+ FX_BOOL IsTTFont() const; |
FX_BOOL GetBBox(FX_RECT& bbox); |
+ int GetHeight() const; |
+ int GetULPos() const; |
+ int GetULthickness() const; |
+ int GetMaxAdvanceWidth() const; |
+ FX_BOOL IsEmbedded() const { 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); |
- int GetHeight(); |
- |
- int GetULPos(); |
- |
- int GetULthickness(); |
- |
- int GetMaxAdvanceWidth(); |
+ private: |
+ void ReleasePlatformResource(); |
+ void DeleteFace(); |
FXFT_Face m_Face; |
- |
CFX_SubstFont* m_pSubstFont; |
- FX_BOOL IsEmbedded() { return m_bEmbedded; } |
- |
- void AdjustMMParams(int glyph_index, int width, int weight); |
uint8_t* m_pFontDataAllocation; |
uint8_t* m_pFontData; |
uint8_t* m_pGsubData; |
@@ -127,15 +109,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 |