fonts


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 🙁


Update

  • Calculating accurate width and height for a font – done*
  • Save as an image – basic saving done (will eventually be able output a resized image in the program)
  • Register sourceforge project – done

* - In C++Builder I just needed to call a function, literally one line of code. In dotNET after several days of experimenting, I eventually managed it by wrapping several API functions. Sometimes I wonder why I switched.