Hi everyone,
I’m trying to reproduce the examples from this page:
https://www.libsdl.org/projects/docs/SDL_ttf/SDL_ttf_frame.html
In particular, I’m trying to use glyph metrics to write text on a baseline. The link above suggests the following positioning:
rect.x=X+minx;
rect.y=Y-TTF_FontAscent(font)+miny;
However, I’ve found that when rendering glyphs, they are always the same height (the font height), and that they are already aligned vertically, so the code above doesn’t work.
What currently works for me is:
rect.x = origin.x
rect.y = origin.y - fontAscent
However, this doesn’t use any of the min/max x/y values. Do they still have a purpose?