I hate fonts and font related code

I think I’ve finally figured out what was going wrong. To prevent it crashing when a ‘&’ character is used, there was a workaround in the code to calculates the size of a string, and for some reason this was causing it to return an incorrect value on some variable width fonts. I’ve removed the ‘&’ from the default valid characters list and hopefully everything is ok (and I’m not going to waste any more time to fix it for that one character).

Next up I have to look at improving the jaggedy right edge, and add some kind of check to use the better character when the width and values are the same. You won’t have any idea what I’m talking about, but never mind: after these I think I can release the new version.

I really want to move to .Net 2.0 🙁

Variable Update

The initial variable width conversion code is up and working in the CVS. The one big problem at the moment is that some of the variable width fonts aren’t reporting their widths properly on some characters, which is causing the image to look a little bit off. I’ll post some more sample pictures (using a good font) after I’ve rewritten a couple of small pieces of code that I know are affecting the output.

Speaking of pictures, I’ve purchased some webspace from Dreamhost which I’ll be using for a gallery of output images from the program (probably using Coppermine). I used an insane deal that came with a free domain name, full shell access, 20Gb+ of space and 1Tb+ of data transfer a month so I won’t have to worry about limits. More on that when I’ve got it all set up properly.

Image to Variable Width ASCII Art Conversions

*** Variable width conversions were added in version 0.6.0, Original post follows: ***

Good news: The idea I had to do variable width ASCII art works.
Bad news: It’s ridiculously slow and totally unworkable. Currently takes around 5 minutes to do a small image.

Edit – Down to about 10 seconds to do the conversion. Still not fast enough but it’s getting there.
Edit2 – Now 0.25 seconds, and I can still optimise the design a lot more.

Just to show I’m not making this up:
First variable width conversion
It’s in Microsoft Sans Serif 8pt, and the aspect ratio isn’t right, but you get the idea.


It’s been a while. I haven’t stopped writing the program, it’s just that I keep starting new features but not finishing them.

Next Version
The next release will have the text brightness/contrast controls replaced with a levels adjustment control. It’s a bit of a big change, but it’s working in a test application and the output is really nice. I’m doing this because contrast was basically useless when the output was being stretched, and adjusting levels gives a much better control. I’ll cover how to use it in more detail when it’s done.

Currently, I’ve finished the code to apply the levels and I’m writing the control to do it in the program. I wanted to do it right, so I actually sat down and designed it and came up with a good internal class design (I’ll have to upload the UML class diagram somewhere or nobody will notice). Hopefully a working version will be in the cvs in a few days.

.Net Framework 2.0
I wasn’t going to move to .Net 2.0, but since Microsoft are giving away the basic program it seems silly not to upgrade. This means that you will have to install the .Net framework 2.0, either through Windows update, or here.

It won’t be the next version, but it will happen when I’ve properly converted and tested everything.

The main differences will be:
– Better programming environment. It’s so nice <3
– Dockable menu and toolbar, both with a WindowsXp style
– Faster execution (apparently)
– TextRenderer class should let me remove all the native pinvoked code