Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/text_server_adv/text_server_adv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion modules/text_server_fb/text_server_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down