The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
My little graphics library needs to do text, and I thought "hey, I'll whip up a C# app to rasterize monospaced fonts to a monochrome bitmap."
Just add a reference to System.Drawing to a console app, and then create a Bitmap and draw to it right?
Even after you set all of the text rendering hints, and even using GraphicsPath.AddString() for more accuracy, you cannot turn off the padding around the fonts, nor get the font to a pixel perfect height at all sizes.
The thing is, the GDI+ code underneath is perfectly capable of doing this. They just didn't expose it.
The alternative is reinventing the entire elephanting wheel and rasterizing the fonts myself.
I found an open source project (under Apache license unfortunately) that I can use to build my tool. Fortunately that tool isn't part of my GFX package itself - it's just a utility to make files that the GFX code can read.
But this shouldn't be necessary. They actually have to parse the TTFs and draw them manually.
That's neat, but they're just retro font files. I guess maybe some of the formats they have are easier to use than TTF but id I went that route I'd be forced to use say, .fon files or whatever, and I'd really like the end user of my library to be able to choose their own fonts. So .ttf is pretty much what's for dinner.
I've got code to do the TTF rasterization now, I just need to modify it for my own nefarious purposes.
It will be nice to have the drawing primitives of GFX sewn up, and this is the last of it, unless i decide to add things like bilinear resampling and antialiasing.
Sadly not so. I won't go into any detail as things ended very badly (thinking of family) but someone I went to school with was caught after many years in a very different profession, having never turned up to work but was being paid.
Yes, it is very common even more now that I have been in the industry a long time. Mainly the younger people entering the industry don't understand some of the more cryptic tasks and may find it boring. Developers normally get pulled in because we organize data and understand layering and lets face it. We truly like to script and manage systems that way because we don't want to enter more information manually.