class EE::Graphics::SystemFontResolver¶
Overview¶
#include <systemfontresolver.hpp> class SystemFontResolver { public: // structs struct GenericEntry; // construction ~SystemFontResolver(); // methods FontDesc resolve(const FontQuery& query); FontDesc resolveFromNamesList(const std::string& namesList, FontWeight weight, bool italic); FontDesc resolveGeneric(GenericFamily generic, FontWeight weight, bool italic); FontDesc getSystemFont() const; FontDesc getSystemMonospaceFont() const; FontDesc getFallbackForCodepoint(Uint32 codepoint, FontWeight weight, bool italic); void warmUp() const; bool fontContainsCodepoint(const std::string& path, Uint32 codepoint, Uint32 faceIndex = 0); void invalidateCache(); void ensureFontListPopulated() const; bool isLoading() const; bool isFontListPopulated() const; std::vector<FontDesc> enumerate(); std::vector<FontDesc> enumerateFamily(const std::string& family); template <typename Fn> void forEach(Fn&& fn); static void setEnabled(bool enabled); static bool isEnabled(); static GenericFamily genericFamilyFromName(const std::string& name); };
Detailed Documentation¶
Methods¶
void warmUp() const
Pre-resolve the native fonts needed by normal rendering. Full system-font enumeration remains lazy until enumerate() or enumerateFamily() is called.