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

summaryrefslogtreecommitdiff
path: root/source/rendering/StarTextPainter.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-03 14:21:51 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-03 14:21:51 +1000
commitd018957b098f00536d0d7641e13aaf1ebddf2238 (patch)
tree0a739eb78c402dd261e06381f77c822c607922ad /source/rendering/StarTextPainter.cpp
parent069d61e487947a8be38f6a3db52695db94fd306e (diff)
Fix font glyph generation to work correctly with other fonts
Diffstat (limited to 'source/rendering/StarTextPainter.cpp')
-rw-r--r--source/rendering/StarTextPainter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/rendering/StarTextPainter.cpp b/source/rendering/StarTextPainter.cpp
index c779c96..1d26e53 100644
--- a/source/rendering/StarTextPainter.cpp
+++ b/source/rendering/StarTextPainter.cpp
@@ -586,7 +586,7 @@ void TextPainter::renderGlyph(String::Char c, Vec2F const& screenPos, unsigned f
return;
const FontTextureGroup::GlyphTexture& glyphTexture = m_fontTextureGroup.glyphTexture(c, fontSize, processingDirectives);
- Vec2F offset = glyphTexture.processingOffset * (scale * 0.5f);
+ Vec2F offset = glyphTexture.offset * scale;
m_renderer->immediatePrimitives().emplace_back(std::in_place_type_t<RenderQuad>(), glyphTexture.texture, screenPos + offset, scale, color, 0.0f);
}