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

summaryrefslogtreecommitdiff
path: root/source/rendering/StarFontTextureGroup.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/rendering/StarFontTextureGroup.hpp')
-rw-r--r--source/rendering/StarFontTextureGroup.hpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/rendering/StarFontTextureGroup.hpp b/source/rendering/StarFontTextureGroup.hpp
index d933f1e..17c6467 100644
--- a/source/rendering/StarFontTextureGroup.hpp
+++ b/source/rendering/StarFontTextureGroup.hpp
@@ -11,24 +11,27 @@ STAR_CLASS(FontTextureGroup);
class FontTextureGroup {
public:
+ typedef tuple<String::Char, unsigned, String> GlyphDescriptor;
+
+ struct GlyphTexture {
+ TexturePtr texture;
+ int64_t time;
+ Vec2F processingOffset;
+ };
+
FontTextureGroup(FontPtr font, TextureGroupPtr textureGroup);
- TexturePtr glyphTexture(String::Char, unsigned fontSize);
- TexturePtr glyphTexture(String::Char, unsigned fontSize, String const& processingDirectives);
+ const GlyphTexture& glyphTexture(String::Char, unsigned fontSize, String const& processingDirectives);
+
+ TexturePtr glyphTexturePtr(String::Char, unsigned fontSize);
+ TexturePtr glyphTexturePtr(String::Char, unsigned fontSize, String const& processingDirectives);
unsigned glyphWidth(String::Char c, unsigned fontSize);
// Removes glyphs that haven't been used in more than the given time in
// milliseconds
void cleanup(int64_t timeout);
-
private:
- typedef tuple<String::Char, unsigned, String> GlyphDescriptor;
-
- struct GlyphTexture {
- TexturePtr texture;
- int64_t time;
- };
FontPtr m_font;
TextureGroupPtr m_textureGroup;