•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 374,572 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,817 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
This code disables font smoothing for a TLabel component. Can easily be converted for other VCL controls.
Loren Soth
Loren Soth
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; //Example Use for Label2 procedure TForm1.Button1Click(Sender: TObject); begin DisableFontSmoothing(Label2); end;
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)