I have a C# programm, that convert Text to Image by using GDI+ method Graphics.DrawString
On my machine with Windows 7 it works good
see example image here:
But on the Windows Server 2019 it creates blurry, not clear image
see example image here:
I even tried to use GDI method TextRenderer.DrawText
but it gave same blur (see links above)
I tried to install .NET Framework 4.8, all Visual C++ Redistributables but had no sucess
Thanks to comment of Selvin, I found the solution
on GDI TextRenderer.DrawText
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
on GDI+ Graphics.DrawString
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;