Force Code wrote:
I copied this into a test program, compiled it, and it did nothing. So, I replaced their "render_text(ras, ren, sl, gl, 10, 100, "Hello, World!")" with a straight win32 TextOut, and got impeccably rendered "Hello World" output indistinguishable from what AGG supposedly produces. But then, I noticed in their code they were calling the Win32 CreateFont with ANTIALIASED_QUALITY specified. So, I have no idea what AGG achieves on its own. As it turns out, ANTIALIASED_QUALITY was all I needed in my own project to begin with. I was utilizing someone else's code in which CreateFont was called with DEFAULT_QUALITY.
Here's an interesting epilogue to this story. I recently downloaded GDI+ which I haven't used before. As I said above, just using the straight GDI CreateFont (or actually CreateFontIndirect) and specifying ANTIALIASED_QUALITY, gives you as good text quality for large fonts as could possibly be imagined. So I was curious about the capabilities of GDI+. With it, you call, graphics.SetTextRenderingHint(TextRenderingHintAntiAliasGridFit), which gives you the highest quality fonts available through GDI+ for non XP systems (I am using Win 2000.) So I tried it and amazingly, the quality was *much* worse than with straight GDI. It looked like it wasn't anti-aliased at all, until you notice that yeah, it is a *little* bit smoother (This was on 72 point Times New Roman; bold, italic). This is very strange, since GDI+ itself uses over 180 GDI functions. There is one higher quality font level available in GDI+, only for XP and Win Server 2003 - TextRenderingHintClearTypeGridFit. It supposedly uses revolutionary "ClearType" technology. I think its clear that what happened is that Microsoft just downgraded font rendering for everything prior to XP, and made their old anti-aliasing algorithm only available for XP or higher, and gave it a new name - "ClearType". Maybe this has been observed before.