I had cause to need a label with a large font on a Delphi form and noticed that its curves were still slightly jagged. I compared this with the same size and font in MSWord which was much smoother. After research I found code that allowed me to smooth my fonts but it's messy and I was wondering if there was a better way? Looking in the VCL source, TFont seems wedded to NONANTIALIASED_QUALITY which is rather frustrating...
Thanks Bri
procedure TForm1.SetFontSmoothing(AFont: TFont);
var
tagLOGFONT: TLogFont;
begin
GetObject(
AFont.Handle,
SizeOf(TLogFont),
@tagLOGFONT);
tagLOGFONT.lfQuality := ANTIALIASED_QUALITY;
AFont.Handle := CreateFontIndirect(tagLOGFONT);
end;
procedure TForm1.FormCreate(Sender: TObject);
var
I : integer;
begin
For I :=0 to ComponentCount-1 do
If Components[I] is TLabel then
SetFontSmoothing( TLabel( Components[I] ).Font );
end;