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); void invalidateCache(); void ensureFontListPopulated() const; bool isLoading() 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
Populate and cache the system font database without copying the resulting font list. Safe to call from a worker thread after enabling the resolver.