On Wed, 9 Dec 2020 15:30:38 +0200 "Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote: > >> + stbtt_GetBakedQuad(font->cdata, > >> + KS_FONT_BITMAP_SIZE, > >> + KS_FONT_BITMAP_SIZE, > >> + *text - KS_SPACE_CHAR, > >> + &x, &y, > >> + &quad, > >> + 1); > >> + > >> + glTexCoord2f(quad.s0, quad.t1); > >> + glVertex2f(quad.x0, quad.y1); > >> + > >> + glTexCoord2f(quad.s1, quad.t1); > >> + glVertex2f(quad.x1, quad.y1); > >> + > >> + glTexCoord2f(quad.s1, quad.t0); > >> + glVertex2f(quad.x1, quad.y0); > >> + > >> + glTexCoord2f(quad.s0, quad.t0); > >> + glVertex2f(quad.x0, quad.y0); > > > > How is the x and y moved to the next location? > > Actually the "y" does not change at all here, because for the moment we > can't draw multi-line text. "x" gets incremented inside > stbtt_GetBakedQuad(). The horizontal advance of the character is used to > calculate the new position. A comment next to that should be stated. /* x is incremented here to a new position */ stbtt_GetBakedQuad(....) -- Steve