![]() |
Skylicht Engine
|
This is the object class that describes .font file information. More...
#include <Graphics2D/SpriteFrame/CFontSource.h>
Public Types | |
| enum | EFontType { GlyphFreeType = 0 , SpriteFont } |
Public Member Functions | |
| IFont * | initFont () |
| IFont * | getFont () |
| const void | setPath (const char *path) |
| const char * | getPath () |
| int | getChangeRevision () |
| Public Member Functions inherited from Skylicht::CAssetResource | |
| CAssetResource (const char *name) | |
| const char * | getGUID () |
| virtual void | deserialize (io::IAttributes *io) |
| virtual bool | save (const char *file) |
| Public Member Functions inherited from Skylicht::CObjectSerializable | |
| void | addProperty (CValueProperty *p) |
| void | autoRelease (CValueProperty *p) |
| CObjectSerializable (const char *name) | |
| CObjectSerializable (const char *name, CObjectSerializable *parent) | |
| void | remove (CValueProperty *value) |
| u32 | getNumProperty () |
| CValueProperty * | getPropertyID (int i) |
| CValueProperty * | getProperty (const char *name) |
| template<class T> | |
| T * | getProperty (const char *name) |
| template<class T> | |
| T | get (const char *name, T defaultValue) |
| template<class T> | |
| T | get (CValueProperty *p, T defaultValue) |
| virtual void | serialize (io::IAttributes *io) |
| virtual bool | saveToFile () |
| virtual bool | load (const char *file) |
| virtual void | save (io::IXMLWriter *writer) |
| virtual void | load (io::IXMLReader *reader) |
| virtual void | parseSerializable (io::IXMLReader *reader) |
| virtual CObjectSerializable * | clone () |
| virtual void | copyTo (CObjectSerializable *object) |
| void | setSavePath (const char *path) |
| Public Member Functions inherited from Skylicht::CValueProperty | |
| CValueProperty (CObjectSerializable *owner, EPropertyDataType dataType, const char *name) | |
| void | setOwner (CObjectSerializable *owner) |
| EPropertyDataType | getType () |
| EPropertyObjectType | getObjectType () |
| void | setUIHeader (const char *header) |
| const std::string & | getUIHeader () |
| void | setUISpace (float space) |
| float | getUISpace () |
| void | setHidden (bool b) |
| bool | isHidden () |
Public Attributes | |
| CEnumProperty< EFontType > | FontType |
| CFilePathProperty | Source |
| CFloatProperty | FontSizePt |
| Public Attributes inherited from Skylicht::CAssetResource | |
| CStringProperty | GUID |
| bool | GenerateNewId |
| Public Attributes inherited from Skylicht::CValueProperty | |
| std::function< void(bool)> | OnSetHidden |
| std::function< void()> | OnChanged |
| std::string | Name |
| std::vector< std::string > | OtherName |
Protected Attributes | |
| IFont * | m_font |
| std::string | m_path |
| std::string | m_source |
| float | m_sizePt |
| int | m_revision |
| Protected Attributes inherited from Skylicht::CObjectSerializable | |
| std::vector< CValueProperty * > | m_value |
| std::vector< CValueProperty * > | m_autoRelease |
| std::string | m_savePath |
| Protected Attributes inherited from Skylicht::CValueProperty | |
| EPropertyDataType | m_dataType |
| EPropertyObjectType | m_objectType |
| CObjectSerializable * | m_owner |
| std::string | m_uiHeader |
| float | m_uiSpace |
| bool | m_hidden |
This is the object class that describes .font file information.
A .font file, generated by the Editor, can represent a FreeType-style font (like .ttf or .otf) or an image sprite-style font (.fnt).
Skylicht-Editor
Drag the font file (.ttf, .otf, .fnt) to the Source field and configure the font size.
Finally, you'll drag this .font file into the CGUIText's Font field to display the text
Use the CFontManager object class to support loading .font files.