   FreeType2 and baseline
  Hello.I recently discovered a problem with my font routine, using FreeType2. I'll do my best to explain it...I generate a font using the FreeType library, and pack the bitmaps into a single texture, storing the glyph information for xAdvance, yOffset and UV offsets etc into a structure. All well and good.My font class renders text and everything was looking good. I pass an XY position, a string, and a rect to the font draw routine. Just recently I added a bit of debugging to draw the rectangle, and shock horror my font is not getting drawn inside it.This all has to do with the baseline. For example an uppercase A sits on top of the rectangle, while a lower case g, the tail bit hangs just below the top.What I need is the baseline offset to add to the initial Y so it fits in the rectangle.I have tried using the ascenders, with very limited success.So, my question is what do I use to find the baseline offset?Hope that makes sense.   
  According to the documentation, face->size->metrics contains face metrics, and the height member is the baseline distance. As also written, the distance is the designed baseline distance, and glyphs may extend into adjacent baselines. So there may still be glyphs that extends above your desired rectangle. To prevent this, the only way I see is to set the initial baseline to the size of the tallest glyph in the face.   