From 2a921cc9f88bec115910a39cb4e31c6001fa192e Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 8 Oct 2022 23:04:02 +0800 Subject: [PATCH] Fix Label text length mismatch after localization --- scene/gui/label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index bf7c59d1cdc4..63401ca19531 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -117,7 +117,7 @@ void Label::_shape() { for (int i = 0; i < TextServer::SPACING_MAX; i++) { TS->shaped_text_set_spacing(text_rid, TextServer::SpacingType(i), font->get_spacing(TextServer::SpacingType(i))); } - TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, text)); + TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, txt)); dirty = false; font_dirty = false; lines_dirty = true;