[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
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
2 changed files with 3 additions and 3 deletions

View file

@ -4822,7 +4822,7 @@ bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) {
// Text span.
int last_non_zero_w = sd->end - 1;
if (i == sd->spans.size() - 1) {
for (int j = span.end - 1; j > span.start; j--) {
for (int j = span.end - 1; j >= span.start; j--) {
last_non_zero_w = j;
uint32_t idx = (int32_t)sd->text[j - sd->start];
if (!is_control(idx) && !(idx >= 0x200B && idx <= 0x200D)) {