I have replaced post headings with images on my blog. The algorithm for making an image from text is as follows:

  1. Grab heading text and turn it into a legal file name.

  2. Render text using WPF typography and put it in a System.Drawing.Bitmap.

  3. Post-process the bitmap to add subpixel antialiasing.

  4. Save the result as PNG and serve.

Funnily enough, WPF’s terrible antialiasing is a good target for ClearTypification. All I had to do is render at triple-width, distribute the energy using a five-element low-pass windowing filter (ugh, can’t beleive I just wrote that), then coalesce the bitmap back to normal width. Which gives me a good subpixel hinting result (not perfect, mind you, because it’s not grid-fitted).

The next step for this tech is to iron out the bugs and make sure some automatic subsitutions happen (like I had with SVG). Also, all bitmap-processing code has to be rewritten in C++ using OpenMP so that it is rendered a little faster. Not that it matters – after all, the image is generated only once.