Browse Source

Merge pull request #107092 from bruvzg/rtl_ol_offset

[RTL] Fix outline offset.
Rémi Verschelde 3 tháng trước cách đây
mục cha
commit
d37a1134eb
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      scene/gui/rich_text_label.cpp

+ 6 - 0
scene/gui/rich_text_label.cpp

@@ -1091,10 +1091,16 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
 				Color font_shadow_color = p_font_shadow_color;
 				bool txt_visible = (font_color.a != 0);
 				if (step == DRAW_STEP_OUTLINE && (outline_size <= 0 || font_outline_color.a == 0)) {
+					processed_glyphs_step += glyphs[i].repeat;
+					off_step.x += glyphs[i].advance * glyphs[i].repeat;
 					continue;
 				} else if (step == DRAW_STEP_SHADOW_OUTLINE && (font_shadow_color.a == 0 || p_shadow_outline_size <= 0)) {
+					processed_glyphs_step += glyphs[i].repeat;
+					off_step.x += glyphs[i].advance * glyphs[i].repeat;
 					continue;
 				} else if (step == DRAW_STEP_SHADOW && (font_shadow_color.a == 0)) {
+					processed_glyphs_step += glyphs[i].repeat;
+					off_step.x += glyphs[i].advance * glyphs[i].repeat;
 					continue;
 				} else if (step == DRAW_STEP_TEXT) {
 					Color user_ul_color = Color(0, 0, 0, 0);