Skip to content

Commit 05587a4

Browse files
committed
fix last emtpy
1 parent aa29cfa commit 05587a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/libgui/fontstash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,14 +640,14 @@ int sth_pos(struct sth_stash* stash, int idx, float size, float width, char* s,
640640
}
641641
glyph = get_glyph(stash, fnt, codepoint, isize);
642642
if (!glyph) continue;
643-
if ((width + glyph->xoff - glyph->xadv ) <= sx) {
643+
if ((width + glyph->xoff - glyph->xadv ) < sx) {
644644
return i;
645645
}
646-
i++;
647646
if (!get_quad(stash, fnt, glyph, isize, &x, &y, &q)) continue;
648647
sx = x;
648+
i++;
649649
}
650-
return i;
650+
return -1;
651651
}
652652

653653
void sth_measure(struct sth_stash* stash, int idx, float size, float width,

0 commit comments

Comments
 (0)