title: Antialiased text on transparent bitmap
body: <p>I'd like to draw antialiased text on a transparent bitmap and have the antialiasing drawn as alpha blended pixels. This way, I can draw the bitmap onto any color surface (or an image, for that matter) and the antialiasing still looks fine.</p>
  
  <p>Here is a simplified sample showing the problem:</p>
  
  <pre><code>protected override void OnPaint(PaintEventArgs e)
  {
      base.OnPaint(e);
      Bitmap bitmap = new Bitmap(this.Width, this.Height);
      Graphics g = Graphics.FromImage(bitmap);
      g.Clear(Color.Empty);
      g.DrawString("hello world", new Font(this.Font.FontFamily, 24), Brushes.Blue, new Point(50, 50));
      e.Graphics.DrawImage(bitmap, new Point(0, 0));
  }
  </code></pre>
  
  <p>And here is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/yNKsN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yNKsN.png" alt="alt text"></a>
  </p>
  
  <p>The ultimate goal of this is to use UpdateLayeredWindow to draw my transparent alpha blended window. I am creating a Conky-like application, and I'd like to be able to use ClearType rendering for text (this is easy without antialiasing, of course). </p>
  
  <p>Currently, I grab the screen behind the form, draw that, and then draw my text. It looks good, but has to be updated and is slow to draw. Any other ideas to accomplish drawing text on the desktop would also be welcome.</p>