I've gotten to a point where i have no problems rendering text on a
chosen baseline. I think i have a good understanding of how
freetype2 works. I can't seem to get my head around how i could
render text centered in a bounding box.
The standard formula to get the vertical distance <y> of the base line
of vertically centered text within a height <h> is
y = h/2 - (asc - desc)/2 - desc = h/2 - (asc + desc)/2
where <asc> and <desc> are the maximum values of the ascender and
descender values (the latter is assumed to be negative for values
below the base line) of all glyphs in the string.
Does this help?
Werner