The GLYPHMETRICS provides the blackbox width and height. In testing, I
noticed the values it was providing for the glyph seemed to be too small. I
rendered the glyph to a bitmap and then zoomed in and compared the glyph to
the metrics being returned. The blackbox width and height as indicated in
GLYPHMETRICS was too small.
I then realized that by default I was getting anti-aliasing when rendering
the text. So I disabled anti-aliasing (by setting the LOGFONT lfQuality
variable to NONANTIALIASED_QUALITY when loading the font).
I repeated the test and this time the blackbox width and height matched the
rendered glyph exactly.
My conclusion is that the values in GLYPHMETRICS assume no anti-aliasing.
The problem is, I need to render anti-aliased text and want to know the
blackbox size.
How can I compute the "as rendered" blackbox size which will include
anti-aliasing?