How do I use a ClearType font in C#/VB.NET?
ClearType is a software technology developed by Microsoft that improves the readability of text on existing LCDs (Liquid Crystal Displays), such as laptop screens, Pocket PC screens, and flat panel monitors.
Turn on ClearTypePress the Windows + Q key on the keyboard. In the Search box type ClearType. In the search results list, click Adjust ClearType text (Control panel). Check Turn on ClearType, and click Next.
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawString("Normal style", this.Font, Brushes.Black, 50, 50);
e.Graphics.TextRenderingHint =
System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
e.Graphics.DrawString("ClearType style", this.Font, Brushes.Black, 50, 100);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With