diff options
author | rtk0c <[email protected]> | 2022-11-25 17:28:07 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-25 17:28:07 -0800 |
commit | f3269a49c474ffe4d382c3d60826ad1cfbb7cdc4 (patch) | |
tree | bf7854505e9dae60c84e64764589c240339c3a41 /source/30-game/FontManager.hpp | |
parent | a0ddfdbcbc6336685362343518770f7bdefd10fe (diff) |
Changeset: 93 Branch comment: [] Port font and UTF-8 string utilities from p6503master-ui-framework
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(); +}; |