Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/rendering/StarFontTextureGroup.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-21 23:13:37 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-21 23:13:37 +1000
commit92ef4dba0fe7a9bd152466cfa4fd194024105895 (patch)
tree30f9cd5c6322c5e99d91d72b04c185baa9e60673 /source/rendering/StarFontTextureGroup.cpp
parentf0fec34dc9c2dbc86dd424e4963983cbb2ed9b41 (diff)
fonts can reload now
Diffstat (limited to 'source/rendering/StarFontTextureGroup.cpp')
-rw-r--r--source/rendering/StarFontTextureGroup.cpp5
1 files changed, 5 insertions, 0 deletions
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());