From 63c685bf1dd3ba5046f1acb5b90e190b62b5e280 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sun, 22 May 2016 22:11:34 +0300 Subject: [PATCH] Use anti aliasing for text drawing --- ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs index 54d8d65be..e26033640 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs @@ -28,6 +28,7 @@ You should have received a copy of the GNU General Public License using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; +using System.Drawing.Text; using System.Linq; using System.Text; using System.Threading; @@ -84,7 +85,9 @@ public override void OnDraw(Graphics g) using (Brush textBrush = new SolidBrush(Options.Color)) using (StringFormat sf = new StringFormat { Alignment = Options.AlignmentHorizontal, LineAlignment = Options.AlignmentVertical }) { + g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; g.DrawString(Text, font, textBrush, Rectangle, sf); + g.TextRenderingHint = TextRenderingHint.SystemDefault; } } }