diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 20:07:16 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 20:07:16 +1000 |
commit | 081dd693ca57ef624342e729c5b27b2e5da98410 (patch) | |
tree | 9d6e15186a383ec34f44cb9a4c1344fcd9928c2c /source/rendering | |
parent | 809744c300d6bc3a4f5cb71a8a67dbad811fe2de (diff) |
Add 1-px padding around font and round to fix jitter
Diffstat (limited to 'source/rendering')
-rw-r--r-- | source/rendering/StarTextPainter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/rendering/StarTextPainter.cpp b/source/rendering/StarTextPainter.cpp index 1d26e53..d6078dc 100644 --- a/source/rendering/StarTextPainter.cpp +++ b/source/rendering/StarTextPainter.cpp @@ -587,7 +587,7 @@ void TextPainter::renderGlyph(String::Char c, Vec2F const& screenPos, unsigned f const FontTextureGroup::GlyphTexture& glyphTexture = m_fontTextureGroup.glyphTexture(c, fontSize, processingDirectives); Vec2F offset = glyphTexture.offset * scale; - m_renderer->immediatePrimitives().emplace_back(std::in_place_type_t<RenderQuad>(), glyphTexture.texture, screenPos + offset, scale, color, 0.0f); + m_renderer->immediatePrimitives().emplace_back(std::in_place_type_t<RenderQuad>(), glyphTexture.texture, Vec2F::round(screenPos + offset), scale, color, 0.0f); } } |