Okay, so I have been trying left and right to figure this out, but I just can't figure it out.
I have been trying to produce a collection of Bitmap variables in my program of a series of characters. The problem is that during my tests, I save a file of the image, and find that I can't get the results I wanted. Let me show a photo, it will help me explain it more
What I am trying to produce is the far right number 8. That image was produced in photoshop where I created a .png of a size 8 Courier New number 8. Notice how it has the 8-bit look (blocky).
Now the one of the left and middle are ones I have tried to create programmically. Here's the code I have been using
Bitmap charImage = new Bitmap(20, 20); Graphics g = Graphics.FromImage(charImage); Font courierFont = new Font("Courier New", 20, FontStyle.Bold, GraphicsUnit.Pixel); SolidBrush colorFont = new SolidBrush(Color.White); Point drawLocation = new Point(0, 0); g.DrawString(character, courierFont, colorFont, drawLocation, StringFormat.GenericDefault);
If I changed the Font's FontStyle to Regular or Bold I get the two other results you see in the image. Note that in Bold form, the number is mirrored, but Regular gives me some wear extra pixels on the left side.
So my problem here is I am trying to produce the result you see on the far right in the picture (which I can't figure out as I thought Courier New would give this effect since it has no problem doing it in Photoshop ... but C# won't do it).
That all make sense? I hope so (I can not think super clear at the moment). Thanks for any help in advance
Edited 3 Years Ago by JOSheaIV