From 92ef4dba0fe7a9bd152466cfa4fd194024105895 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Wed, 21 Jun 2023 23:13:37 +1000 Subject: fonts can reload now --- source/rendering/StarFontTextureGroup.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/rendering/StarFontTextureGroup.cpp') diff --git a/source/rendering/StarFontTextureGroup.cpp b/source/rendering/StarFontTextureGroup.cpp index d8c14d0..fe15381 100644 --- a/source/rendering/StarFontTextureGroup.cpp +++ b/source/rendering/StarFontTextureGroup.cpp @@ -34,6 +34,11 @@ void FontTextureGroup::addFont(FontPtr const& font, String const& name, bool def m_defaultFont = m_font = font; } +void FontTextureGroup::clearFonts() { + m_fonts.clear(); + m_font = m_defaultFont; +} + const FontTextureGroup::GlyphTexture& FontTextureGroup::glyphTexture(String::Char c, unsigned size, String const& processingDirectives) { auto res = m_glyphs.insert(GlyphDescriptor{c, size, processingDirectives, m_font.get() }, GlyphTexture()); -- cgit v1.2.3