5
Come utilizzare un font ClearType in C#/VB.NET?Uso del font di tipo chiaro in C#/VB.NET
Come utilizzare un font ClearType in C#/VB.NET?Uso del font di tipo chiaro in C#/VB.NET
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);
}
Inoltre, per impostare il metodo di smoothing "standard," l'uso di:
e.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAliasGridFit