-
Dec 12th, 2015, 08:19 PM
#1
Thread Starter
Junior Member
How can I use DrawString to reproduce old Windows fonts precisely?
I'm trying to use DrawString to recreate images like the one below. If I remember back that far, I'm pretty sure Windows 98 used to draw MS Sans Serif exactly like this. I'm having no luck reproducing this text exactly with DrawString, partly because I'm not 100% sure which font it is. I've tried DrawString with every 'famous' sans serif font on Graphics objects with various TextRenderingHint values, but with no luck. How can I programmatically draw strings identical to the ones in this image?
-
Dec 12th, 2015, 09:45 PM
#2
Re: How can I use DrawString to reproduce old Windows fonts precisely?
-
Dec 12th, 2015, 10:07 PM
#3
Thread Starter
Junior Member
Re: How can I use DrawString to reproduce old Windows fonts precisely?
I have actually, and a couple of other ones I found on Google. I've seen some search results that are similar (like Honda something or other font), but there's no way that any result I found was a standard Windows font back in the day. The key here is that this font is drawn with no anti-aliasing whatsoever; it was designed for the screen and is drawn pixel-for-pixel. Back in the day, that's how it was done. Even if my guess of MS Sans Serif is correct, the actual version of the font is different depending on one's OS (i.e. my current version of it draws anti-aliased at the same font size that its predecessor draws pixelated).
Keeping that in mind, I'm wondering if there's a way to make DrawString look like the example image regardless of which OS it is. I realize that I could pre-store each possible character (as an image or a data collection) within a data collection, but I would need hundreds of image files to hold regular, bold, italic, and bold+italic versions of many ASCII characters. I'd only settle for something like this if it were the only way.
-
Dec 12th, 2015, 10:58 PM
#4
-
Dec 12th, 2015, 11:08 PM
#5
Thread Starter
Junior Member
Re: How can I use DrawString to reproduce old Windows fonts precisely?
Thanks for your suggestion. I've made fonts like that before (including this one recently), and it's time-consuming. But creating the font and installing it on the user's machine during setup may actually be the most efficient way of achieving my desired result.
P.S. The attached font is effectively a monospace variant of the Unix font, but with a lot of added Unicode range. I designed it for my own coding uses
Last edited by LogLady; Dec 12th, 2015 at 11:12 PM.
-
Dec 12th, 2015, 11:27 PM
#6
Re: How can I use DrawString to reproduce old Windows fonts precisely?
Nice looking font. The matrix appears to be about 11x8, my own micro font is 7x5, so less pixels to work with and thus a little crude.
-
Dec 13th, 2015, 05:12 PM
#7
Thread Starter
Junior Member
Re: How can I use DrawString to reproduce old Windows fonts precisely?
Thanks! Through painstaking searches, I've identified the font as Tahoma version 2.30 (included with Windows 2000, Office 2000, and others). Even using this font, I can't make DrawString behave like Windows of old. New font it is then.
-
Dec 13th, 2015, 05:45 PM
#8
Fanatic Member
Re: How can I use DrawString to reproduce old Windows fonts precisely?
Originally Posted by LogLady
Even using this font, I can't make DrawString behave like Windows of old. New font it is then.
What part of the behavior aren't you getting out of DrawString? I tried the standard tahoma (probably not version 2.30) on a test project, settings the TextRenderingHint of the forms graphics to SingleBitPerPixelGridFit and got this:
Characters are a bit more tall then your example, but I'm guessing it's the font version that does that (althought I may be wrong, which I'm often).
Don't ask why, just reboot!
-
Dec 14th, 2015, 10:05 AM
#9
Re: How can I use DrawString to reproduce old Windows fonts precisely?
[off topic]
I saw the Honda Center in the postings, wonder it was for... then saw Wes McCauley and thought aaahh! QUACK!
Wish I could get there more often.
[/off topic]
-tg
-
Dec 14th, 2015, 10:57 AM
#10
Re: How can I use DrawString to reproduce old Windows fonts precisely?
I wish I understood the "why" here?
Text is just plain easier to read when it's smoothed, and while higher DPI displays are nice, I'm glad on the cruddy "HD" resolution we settle for that Windows is smoothing them for me. So why try to recreate the bad old days?
It sounds like I'm totally against it, but I bet there's some good reasons. If we knew the reasons, and the "why" instead of the "what", we could maybe think of something more out-of-the-box than "how to render this font with no hinting". (Truth be told though, fonts are not set in stone, and even the core Windows fonts have probably been updated over time. It may be impossible to perfectly reproduce them without creating your own Bitmap fonts, which would actually be copyright infringement.)
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|