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/StarTextPainter.hpp | |
parent | 1d04c689ba3e9d8bb3602a7289fe5756aa8fb3fd (diff) |
Cache font directives
Diffstat (limited to 'source/rendering/StarTextPainter.hpp')
-rw-r--r-- | source/rendering/StarTextPainter.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/rendering/StarTextPainter.hpp b/source/rendering/StarTextPainter.hpp index 1a0b1d9..7f132fd 100644 --- a/source/rendering/StarTextPainter.hpp +++ b/source/rendering/StarTextPainter.hpp @@ -78,7 +78,7 @@ public: void setLineSpacing(float lineSpacing); void setMode(FontMode mode); void setFontColor(Vec4B color); - void setProcessingDirectives(String directives); + void setProcessingDirectives(StringView directives); void setFont(String const& font); void addFont(FontPtr const& font, String const& name); void reloadFonts(); @@ -90,14 +90,14 @@ private: FontMode mode; Vec4B color; String font; - String directives; + Directives directives; }; RectF doRenderText(StringView s, TextPositioning const& position, bool reallyRender, unsigned* charLimit); RectF doRenderLine(StringView s, TextPositioning const& position, bool reallyRender, unsigned* charLimit); RectF doRenderGlyph(String::Char c, TextPositioning const& position, bool reallyRender); - void renderGlyph(String::Char c, Vec2F const& screenPos, unsigned fontSize, float scale, Vec4B const& color, String const& processingDirectives); + void renderGlyph(String::Char c, Vec2F const& screenPos, unsigned fontSize, float scale, Vec4B const& color, Directives const* processingDirectives = nullptr); RendererPtr m_renderer; FontTextureGroup m_fontTextureGroup; |