diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-17 20:55:45 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-17 20:56:36 +0100 |
commit | 7cb5e005eea74811e93bb40d060739eb74a47e2d (patch) | |
tree | 4407aa19bb23965007035abb7013f4c33552e230 /scene/gui | |
parent | cf0716952db45acf7d7430552f2759c57e0d876e (diff) |
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.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/label.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index a7f88514e0..b4608952ee 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); |