From 591db6b866f9fbeff7827cb149fb29ba25bacec9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 18 Apr 2015 14:28:46 +0000 Subject: [PATCH] text: fix a minor accuracy issue in the text alignment logic. --- src/text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.cpp b/src/text.cpp index d4e5d0f5..8d88fe2c 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -102,7 +102,7 @@ void Text::TickDraw(float seconds, Scene &scene) { Font *font = Forge::GetFont(data->m_font); vec3 delta(0.0f); - float text_width = length * font->GetSize().x + float text_width = (length - 0.5f) * font->GetSize().x + (length - 1) * data->m_spacing; if (data->m_align == TextAlign::Right)