![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton manager for custom fonts. More...
#include <FontManager.h>
Public Member Functions | |
| void | Initialize () |
| Initialize font system Must be called after ImGui context creation but before first frame. | |
| bool | LoadFontAwesome (const std::string &fontPath, float fontSize=16.0f) |
| Load Font Awesome font. | |
| ImFont * | LoadFont (const std::string &fontPath, float fontSize, const std::string &fontName="") |
| Load a custom font. | |
| ImFont * | GetFontAwesome () const |
| Get Font Awesome font. | |
| ImFont * | GetDefaultFont () const |
| Get default font. | |
| bool | IsFontAwesomeLoaded () const |
| Check if Font Awesome is loaded. | |
Static Public Member Functions | |
| static FontManager & | Get () |
| Get singleton instance. | |
Private Member Functions | |
| FontManager () | |
| ~FontManager ()=default | |
| FontManager (const FontManager &)=delete | |
| FontManager & | operator= (const FontManager &)=delete |
Private Attributes | |
| ImFont * | m_FontAwesome |
| ImFont * | m_DefaultFont |
| bool | m_Initialized |
Singleton manager for custom fonts.
Definition at line 24 of file FontManager.h.
|
inlineprivate |
Definition at line 72 of file FontManager.h.
|
privatedefault |
|
privatedelete |
|
static |
Get singleton instance.
Definition at line 16 of file FontManager.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::BlueprintEditorGUI::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get default font.
Definition at line 64 of file FontManager.h.
References m_DefaultFont.
|
inline |
Get Font Awesome font.
Definition at line 58 of file FontManager.h.
References m_FontAwesome.
| void Olympe::FontManager::Initialize | ( | ) |
Initialize font system Must be called after ImGui context creation but before first frame.
Definition at line 22 of file FontManager.cpp.
References m_DefaultFont, m_Initialized, and SYSTEM_LOG.
Referenced by Olympe::BlueprintEditorGUI::Initialize().
Here is the caller graph for this function:
|
inline |
Check if Font Awesome is loaded.
Definition at line 69 of file FontManager.h.
References m_FontAwesome.
| ImFont * Olympe::FontManager::LoadFont | ( | const std::string & | fontPath, |
| float | fontSize, | ||
| const std::string & | fontName = "" |
||
| ) |
Load a custom font.
| fontPath | Path to font file |
| fontSize | Font size |
| fontName | Optional name identifier |
Definition at line 83 of file FontManager.cpp.
References GetComponentTypeID_Static(), m_Initialized, and SYSTEM_LOG.
Here is the call graph for this function:Load Font Awesome font.
| fontPath | Path to Font Awesome .otf file |
| fontSize | Base font size (default: 16.0f) |
Definition at line 35 of file FontManager.cpp.
References FONT_ICON_RANGE_FA_MAX, FONT_ICON_RANGE_FA_MIN, GetComponentTypeID_Static(), m_FontAwesome, m_Initialized, and SYSTEM_LOG.
Referenced by Olympe::BlueprintEditorGUI::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatedelete |
|
private |
Definition at line 78 of file FontManager.h.
Referenced by GetDefaultFont(), and Initialize().
|
private |
Definition at line 77 of file FontManager.h.
Referenced by GetFontAwesome(), IsFontAwesomeLoaded(), and LoadFontAwesome().
|
private |
Definition at line 79 of file FontManager.h.
Referenced by Initialize(), LoadFont(), and LoadFontAwesome().