소스 검색

Merge pull request #8952 from GodotExplorer/pr-fix-richtextlabel-warp-CJK

[2.1] Fix text warp in color blocks with CJK
Rémi Verschelde 8 년 전
부모
커밋
6fb97d9898
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/gui/rich_text_label.cpp

+ 1 - 1
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 + begin > p_width) {
+						if (end > 0 && w + cw + wofs > p_width) {
 							break; //don't allow lines longer than assigned width
 						}