From 7cb5e005eea74811e93bb40d060739eb74a47e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 17 Dec 2018 20:55:45 +0100 Subject: [PATCH] Label: Fix kerning when using Uppercase mode Seemingly a typo, I did not check what exact impact it had, but the x_ofs would likely have accumulated errors when using fonts with varying char widths. --- scene/gui/label.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index a7f88514e02..b4608952ee1 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -244,7 +244,7 @@ void Label::_notification(int p_what) { CharType n = xl_text[i + pos + 1]; if (uppercase) { c = String::char_uppercase(c); - n = String::char_uppercase(c); + n = String::char_uppercase(n); } float move = font->draw_char(ci, Point2(x_ofs_shadow, y_ofs) + shadow_ofs, c, n, font_color_shadow, false); @@ -265,7 +265,7 @@ void Label::_notification(int p_what) { CharType n = xl_text[i + pos + 1]; if (uppercase) { c = String::char_uppercase(c); - n = String::char_uppercase(c); + n = String::char_uppercase(n); } x_ofs += drawer.draw_char(ci, Point2(x_ofs, y_ofs), c, n, font_color);