diff options
Diffstat (limited to 'core/fxge/include/fx_font.h')
-rw-r--r-- | core/fxge/include/fx_font.h | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h index b38ecaed33..17adc7ac9c 100644 --- a/core/fxge/include/fx_font.h +++ b/core/fxge/include/fx_font.h @@ -19,7 +19,6 @@ typedef struct FT_FaceRec_* FXFT_Face; typedef void* FXFT_Library; class CFX_FaceCache; -class CFX_FontFaceInfo; class CFX_FontMapper; class CFX_PathData; class CFX_SizeGlyphCache; @@ -65,6 +64,13 @@ using CFX_TypeFace = SkTypeface; #define FXFONT_FW_NORMAL 400 #define FXFONT_FW_BOLD 700 +#define CHARSET_FLAG_ANSI 1 +#define CHARSET_FLAG_SYMBOL 2 +#define CHARSET_FLAG_SHIFTJIS 4 +#define CHARSET_FLAG_BIG5 8 +#define CHARSET_FLAG_GB 16 +#define CHARSET_FLAG_KOREAN 32 + class CFX_Font { public: CFX_Font(); @@ -379,6 +385,50 @@ class IFX_SystemFontInfo { virtual void* RetainFont(void* hFont); }; +class CTTFontDesc { + public: + CTTFontDesc() { + m_Type = 0; + m_pFontData = nullptr; + m_RefCount = 0; + } + ~CTTFontDesc(); + // ret < 0, releaseface not appropriate for this object. + // ret == 0, object released + // ret > 0, object still alive, other referrers. + int ReleaseFace(FXFT_Face face); + int m_Type; + union { + struct { + FX_BOOL m_bItalic; + FX_BOOL m_bBold; + FXFT_Face m_pFace; + } m_SingleFace; + struct { + FXFT_Face m_pFaces[16]; + } m_TTCFace; + }; + uint8_t* m_pFontData; + int m_RefCount; +}; + +class CFX_FontFaceInfo { + public: + CFX_FontFaceInfo(CFX_ByteString filePath, + CFX_ByteString faceName, + CFX_ByteString fontTables, + uint32_t fontOffset, + uint32_t fileSize); + + const CFX_ByteString m_FilePath; + const CFX_ByteString m_FaceName; + const CFX_ByteString m_FontTables; + const uint32_t m_FontOffset; + const uint32_t m_FileSize; + uint32_t m_Styles; + uint32_t m_Charsets; +}; + class CFX_FolderFontInfo : public IFX_SystemFontInfo { public: CFX_FolderFontInfo(); |