diff options
Diffstat (limited to 'source/30-game/FontManager.hpp')
-rw-r--r-- | source/30-game/FontManager.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/30-game/FontManager.hpp b/source/30-game/FontManager.hpp new file mode 100644 index 0000000..ef87f0c --- /dev/null +++ b/source/30-game/FontManager.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "Font.hpp" +#include "RcPtr.hpp" + +class FontManager { +public: + // Pointers are valid staring from program entry, but object will not be initialized until FontManager::Init() is called. + static RcPtr<Font> sans; + static RcPtr<Font> serif; + static RcPtr<Font> monospace; + +public: + static const RcPtr<Font>& GetDefaultFont(); + + static const Font* ResolveFallback(const Font* font); + static const RcPtr<Font>& ResolveFallback(const RcPtr<Font>& font); + + static void Init(); + static void Shutdown(); +}; |