I abandoned my efforts to rasterize TTF on my own since I don't want to do hinting, so I turned to Windows's method... And I think I found a bug.
I used Windows's DrawText function and in the left column are GLYPHMETRICS structures loaded with GetGlyphOutline:
SetRect(&rect, 10,0,5,5);
SetTextColor(glyph_hdc, RGB(255,0,0));
DrawText(glyph_hdc, TEXT("A"), -1,&rect, DT_NOCLIP);
...
SetRect(&rect, 70,0,5,5);
SetTextColor(glyph_hdc, RGB(255,0,0));
DrawText(glyph_hdc, TEXT("!"), -1,&rect, DT_NOCLIP);
GetGlyphOutlineA(glyph_hdc, ascii_code, GGO_BITMAP, &glyph_metric_A, 10000, win_bitmap, &m2);
I used gray 2x1 rectangles in Adobe Illustrator to measure distances...
I hope that the picture illustrates well the apparent bug: The BlackBoxX and BlackBoxY should be enclosing the glyph. Do you think that this is an internal bug? Do you know how to correct for this? It seems like the black box does not account for hinting.