#pragma once #include #include #include #include "Display/UI/Text/Font.h" #include "Display/UI/Text/Glyph.h" #include "Display/UI/Text/GlyphKey.h" namespace display::ui::text { class Fonts { public: Fonts(); ~Fonts(); const Glyph &getGlyph(char ch, const Font &key); private: struct Library; struct Face; std::unique_ptr library; std::unordered_map, FontHash> fonts; std::unordered_map glyphs; void loadAllFonts(); void loadFonts(const std::string &path); }; } // namespace display::ui::text