| | |
Disable font smoothing (Anti-aliased font)
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;
Similar Threads
- pygame.font.Font (Python)
- about Font (C#)
- change font type, font color, font size and bacground color in listbox (JavaScript / DHTML / AJAX)
- Font check (Graphics and Multimedia)
- Help with Font Size In IE (Web Browsers)
| Thread Tools | Search this Thread |



