Mega Code Archive

 
Categories / Delphi / System
 

How to disable font smoothinganti aliasing

Title: How to disable font smoothing/anti-aliasing procedure TForm1.DisableFontSmoothing(LabelName: TLabel); var tagLOGFONT: TLogFont; begin GetObject(LabelName.Font.Handle, SizeOf(TLogFont), @tagLOGFONT); tagLOGFONT.lfQuality := NONANTIALIASED_QUALITY; LabelName.Font.Handle := CreateFontIndirect(tagLOGFONT); end; procedure TForm1.Button1Click(Sender: TObject); begin DisableFontSmoothing(Label2); end;