Ver Fonte

Fixed underlines and striketrough not respecting visible character

(cherry picked from commit 9c2c2ab2b0485b83148f636318ccecd903e4af8a)
janglee há 5 anos atrás
pai
commit
8bbcc624fd
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      scene/gui/rich_text_label.cpp

+ 1 - 1
scene/gui/rich_text_label.cpp

@@ -437,7 +437,6 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
 						was_separatable = separatable;
 						just_breaked_in_middle = false;
 
-						w += cw;
 						fw += cw;
 
 						end++;
@@ -579,6 +578,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
 
 								if (visible) {
 									line_is_blank = false;
+									w += font->get_char_size(c[i], c[i + 1]).x;
 								}
 
 								if (c[i] == '\t') {