Using GlyphMetrics

Hi everyone,

I’m trying to reproduce the examples from this page:

In particular, I’m trying to use glyph metrics to write text on a baseline. The link above suggests the following positioning:


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?