I'm trying to generate a picture for users when they join and leave a server on Discord. Everything went great, until what I was getting as picture on Windows, looked very different on Ubuntu (view examples down below). I tried different ways of TextRendering, like TextRenderingHint.SingleBitPerPixelGridFit, but none worked. The fonts I used both times are exactly the same, yet on Ubuntu it looks very jagged.
using (Graphics grD = Graphics.FromImage(img))
{
grD.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
grD.DrawString(message, WelcomeFont, drawBrush, x1, y1, drawFormat);
grD.DrawString(name, UsernameFont, drawBrush, x2, y2, drawFormat);
grD.DrawString(server, ServerFont, drawBrush, x3, y3, drawFormat);
img = new Bitmap(img, new Size(400, 225));
return img;
}
Could someone please tell me how I can fix this?
Images:
