From d782d827f77d2c0fd4a5e622bf8b2c7767e3353b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Sat, 12 Apr 2025 21:13:19 +0300 Subject: [PATCH] [RTL] Fix VC_GLYPHS_RTL visible character trimming mode. --- scene/gui/rich_text_label.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index a444936814..90001e4567 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1354,8 +1354,8 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, outline_size, fx_offset + char_off, gl, font_color); } } - processed_glyphs_step++; } + processed_glyphs_step++; if (step == DRAW_STEP_TEXT && skip) { // Finish underline/overline/strikethrough is previous glyph is skipped. if (ul_started) { @@ -1403,7 +1403,6 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o } } last_color = color; - processed_glyphs_step++; } else { // Finish box is previous glyph is skipped. if (last_color.a > 0.0) { @@ -1413,6 +1412,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o } last_color = Color(0, 0, 0, 0); } + processed_glyphs_step++; off_step.x += glyphs[i].advance; } }