summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 4c025e92df..ec89b7b690 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -334,7 +334,7 @@ int Label::get_longest_line_width() const {
}
} else {
- int char_width=font->get_char_size(current).width;
+ int char_width=font->get_char_size(current,text[i+1]).width;
line_width+=char_width;
}
@@ -454,7 +454,7 @@ void Label::regenerate_word_cache() {
word_pos=i;
}
- char_width=font->get_char_size(current).width;
+ char_width=font->get_char_size(current,text[i+1]).width;
current_word_size+=char_width;
line_width+=char_width;
total_char_cache++;