fixed font size

This commit is contained in:
Thomas Braun 2025-05-16 14:37:45 +02:00
commit 0a7fe11965

View file

@ -205,7 +205,7 @@ namespace Greenshot.Editor.Drawing
EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false); EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
} }
float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 1.4f; float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 3f;
using FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name); using FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name);
using Font font = new Font(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel); using Font font = new Font(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, font); TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, font);