diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-04 06:01:29 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-04 06:01:29 +1000 |
commit | a45d16b4ed2698361ff68c5502bcabfc908099a7 (patch) | |
tree | 58de4cdff77ed7d99ae354be711c7ec6843a058e /source/rendering/StarFontTextureGroup.hpp | |
parent | 1d04c689ba3e9d8bb3602a7289fe5756aa8fb3fd (diff) |
Cache font directives
Diffstat (limited to 'source/rendering/StarFontTextureGroup.hpp')
-rw-r--r-- | source/rendering/StarFontTextureGroup.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<String::Char, unsigned, String, Font*> GlyphDescriptor; + typedef tuple<String::Char, unsigned, size_t, Font*> 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); |