From f3269a49c474ffe4d382c3d60826ad1cfbb7cdc4 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 25 Nov 2022 17:28:07 -0800 Subject: Changeset: 93 Branch comment: [] Port font and UTF-8 string utilities from p6503 --- source/30-game/FontManager.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/30-game/FontManager.hpp (limited to 'source/30-game/FontManager.hpp') 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 sans; + static RcPtr serif; + static RcPtr monospace; + +public: + static const RcPtr& GetDefaultFont(); + + static const Font* ResolveFallback(const Font* font); + static const RcPtr& ResolveFallback(const RcPtr& font); + + static void Init(); + static void Shutdown(); +}; -- cgit v1.2.3-70-g09d2