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

summaryrefslogtreecommitdiff
path: root/source/rendering/StarTextPainter.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/rendering/StarTextPainter.hpp')
-rw-r--r--source/rendering/StarTextPainter.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/rendering/StarTextPainter.hpp b/source/rendering/StarTextPainter.hpp
index 64b2748..fb201cf 100644
--- a/source/rendering/StarTextPainter.hpp
+++ b/source/rendering/StarTextPainter.hpp
@@ -3,6 +3,7 @@
#include "StarFontTextureGroup.hpp"
#include "StarAnchorTypes.hpp"
+#include "StarRoot.hpp"
namespace Star {
@@ -51,7 +52,7 @@ struct TextPositioning {
// kerning*.
class TextPainter {
public:
- TextPainter(FontPtr font, RendererPtr renderer, TextureGroupPtr textureGroup);
+ TextPainter(RendererPtr renderer, TextureGroupPtr textureGroup);
RectF renderText(String const& s, TextPositioning const& position);
RectF renderLine(String const& s, TextPositioning const& position);
@@ -73,6 +74,8 @@ public:
void setSplitIgnore(String const& splitIgnore);
void setFontColor(Vec4B color);
void setProcessingDirectives(String directives);
+ void setFont(String const& font);
+ void addFont(FontPtr const& font, String const& name);
void cleanup(int64_t textureTimeout);
@@ -80,6 +83,7 @@ private:
struct RenderSettings {
FontMode mode;
Vec4B color;
+ String font;
};
RectF doRenderText(String const& s, TextPositioning const& position, bool reallyRender, unsigned* charLimit);