views:

96

answers:

1

I have a TImage component that I print a Text string to using TCanvas.TextOut(). I set the height and width of the TImage to a large size like 50 pixels X (TextWidth) pixels, and set the Canvas font Height to something a little smaller like 48 pixels. I then BitBlt() the TImage's bitmap on to the main Canvas. What I see on the screen is big skinny letters that are terribly jagged. What I want instead are thick jumbo letters that appear smooth. The reason for using the TImage/BitBlt combo is because I need to do resizing and alpha blending of the text on the fly.

What is the easiest way for me to get big smooth letters to be printed to my TImage bitmap?

+9  A: 
Andreas Rejbrand
Hello Andreas. It turned out most of the problem was due to my font choice. Delphi 6's default choice doesn't scale well as you pointed out. Following your suggestion I tried some of the newer ones and most of the problem went away. I believe the remaining jaggies that I see are due to my use of AlphaBlend() to resize the Text image in transit, rather than reprinting the Text image each time using varying Height (pixel) values, a speed optimization that might not be necessary. Thanks for the tip about ClearType. I'll take a look at that.
Robert Oschler