aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde2017-06-07 07:38:53 +0200
committerRémi Verschelde2017-06-07 07:38:53 +0200
commit897d6377b7fac17a45c8cb1f572bff7349697e25 (patch)
tree2bfafa021a245ddeea574a8d7a7fce7d4bd2d99d
parent9e5efa4abd2a9cfdcf637cc393222948f8f6cc3f (diff)
downloadgodot-897d6377b7fac17a45c8cb1f572bff7349697e25.tar.gz
godot-897d6377b7fac17a45c8cb1f572bff7349697e25.tar.zst
godot-897d6377b7fac17a45c8cb1f572bff7349697e25.zip
Revert "Fix text warp in color blocks with CJK"
This reverts commit cd778e00dc5362d00d4760c79fc301951f6f9b75. That commit introduced regressions for non-CJK languages are discussed in #8952. Fixes #9078.
-rw-r--r--scene/gui/rich_text_label.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index d3a49b06d..0b8595de4 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -264,7 +264,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
cw = tab_size * font->get_char_size(' ').width;
}
- if (end > 0 && w + cw + wofs > p_width) {
+ if (end > 0 && w + cw + begin > p_width) {
break; //don't allow lines longer than assigned width
}