36 auto face = std::make_unique<FontFace>();
37 if (!face->load(font_path)) {
39 "set_default_font: failed to load '{}'", font_path);
43 auto atlas = std::make_unique<GlyphAtlas>(*face, pixel_size, atlas_size);
49 "Default font set: '{}' {}px atlas {}px", font_path, pixel_size, atlas_size);
bool set_default_font(const std::string &path, uint32_t pixel_size, uint32_t atlas_size=512)
Locate a system font by family and style, then load it as the default.
std::unique_ptr< FontFace > m_default_face
std::unique_ptr< GlyphAtlas > m_default_atlas
void shutdown()
Release the FreeType library handle.
bool initialize()
Initialise the FreeType library.