[TextServer] Fix range for zero-width glyphs extra spacing.

This commit is contained in:
Pāvels Nadtočajevs
2025-10-23 21:39:22 +03:00
parent a4607f4522
commit eaa643a4bb
2 changed files with 3 additions and 3 deletions

View File

@@ -6859,8 +6859,8 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
unsigned int last_non_zero_w = glyph_count - 1;
if (last_run) {
for (unsigned int i = glyph_count - 1; i > 0; i--) {
last_non_zero_w = i;
for (int64_t i = glyph_count - 1; i >= 0; i--) {
last_non_zero_w = (unsigned int)i;
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
if (glyph_pos[i].x_advance != 0) {
break;