From a45d16b4ed2698361ff68c5502bcabfc908099a7 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 4 Jul 2023 06:01:29 +1000 Subject: Cache font directives --- source/rendering/StarFontTextureGroup.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/rendering/StarFontTextureGroup.hpp') diff --git a/source/rendering/StarFontTextureGroup.hpp b/source/rendering/StarFontTextureGroup.hpp index 6bbb120..ecca6f6 100644 --- a/source/rendering/StarFontTextureGroup.hpp +++ b/source/rendering/StarFontTextureGroup.hpp @@ -4,6 +4,7 @@ #include "StarColor.hpp" #include "StarFont.hpp" #include "StarRenderer.hpp" +#include "StarDirectives.hpp" namespace Star { @@ -12,7 +13,7 @@ STAR_CLASS(FontTextureGroup); class FontTextureGroup { public: // Font* is only included for key uniqueness and should not be dereferenced - typedef tuple GlyphDescriptor; + typedef tuple GlyphDescriptor; struct GlyphTexture { TexturePtr texture; @@ -22,10 +23,10 @@ public: FontTextureGroup(TextureGroupPtr textureGroup); - const GlyphTexture& glyphTexture(String::Char, unsigned fontSize, String const& processingDirectives); + const GlyphTexture& glyphTexture(String::Char, unsigned fontSize, Directives const* processingDirectives = nullptr); TexturePtr glyphTexturePtr(String::Char, unsigned fontSize); - TexturePtr glyphTexturePtr(String::Char, unsigned fontSize, String const& processingDirectives); + TexturePtr glyphTexturePtr(String::Char, unsigned fontSize, Directives const* processingDirectives = nullptr); unsigned glyphWidth(String::Char c, unsigned fontSize); -- cgit v1.2.3