General


About the current version

First, a note to people still downloading the previous version: STOP IT. That is what happens when you link directly to a file instead of the download page.

Things I forgot to mention:

  • The save as 8-bit colour output is currently using the inbuilt gif compression to reduce it down to <256 colours. It isn’t very good at it, so the output will be much better if I ever get around to writing my own octree quantization code (or find some gpl code to do it).
  • To get the best results, check the invert output button so it has white text on black, then “save as colour text”, and save as 8-bit XHTML. I’ve been meaning to write some tutorials for a long time.
  • If you want to save it as an image, to print or whatever, I would suggest the Save As Image plugin for firefox. Then just load the html into firefox and you rightclick to save the page as a png.

What the 26

Either sourceforge’s stats are messed up, or the program was downloaded 10,068 times yesterday (up from the usual ~150 a day). Since it says that only 2838 people have downloaded the latest exe, I think it’s a bug.

No promises, but I’ve just read an article on colouring richtextbox text that I might be able to adapt for a certain oft-requested feature. I tried something very similar using the same method, and it looks like I gave up just before I found the answer. If it updates with a good speed everything else is easy; we’ll see…


Don’t panic!

I’m manually restoring everything, so things might be a little weird until I’m finished.

Edit: Ok, everything I could recover is back exactly how it was. I think there were a couple of comments that google hadn’t cached and are gone forever, but since one of them was a “do color ascii art!” I’m not that bothered.

I will be making regular backups from now on. 😳


Update

The program has been converted to .net 2.0. The menus have all been replaced with draggable menustrips, and I’m using the Silk icons set for most of the items. The exe size has dropped by about 80k.

All but one of the native winapi functions have been replaced with .net functions (for the last I need to either find a way to check the text metrics in .net or an accurate method to detect if the font is fixed width).

About having accurate output for all the fonts, and this is a real kicker, they were always accurate. The richtextbox control doesn’t display them correctly. Even in the older version, if the text is all messed up and you save it as an image it will save correctly. Using ANSI characters, some of the fonts display the characters in the control as a square, but still save the output correctly. We will just have to live with it until I sort out a way to fix the output, or write my own text control.

I want to add one more thing before I release the new version (a form to edit the settings), so unless I get distracted by another project it’ll be out sometime this week.

Boring technical stuff that I couldn’t find the solution for online and had to workout for myself, part 1
You have a toolStripContainer with a MenuStrip and a set of ToolStrips. After spending a couple of minutes neatly lining them all up how you want, you save and compile and everything’s good. Except that every single time you reload the form, or just switch to the code then back to the designer, all the controls are rearranged to fit one per line. EVERY SINGLE TIME.

Here is how to set the control positions at runtime:

// First clear the container
toolStripContainer1.TopToolStripPanel.Controls.Clear();

// Then add the strips one by one in _reverse_ order using:
ToolStripContainer1.TopToolStripPanel.Join(ToolStripWhatever);

// Finally add the menustrip:
toolStripContainer1.TopToolStripPanel.Join(menuStrip1);


http://ascgen.jmsoftware.co.uk updated(!)

Let’s see, I spent a week or so writing a MVC framework in php, then I found Code Igniter and decided to use that instead.

Just as a test, I’ve remade the old ascgen website using the framework, and recreated the design totally in CSS. It doesn’t look that much, but it validates as XHTML strict and the examples gallery is all created on the fly from a mysql database. The framework is really easy to use; most of the time was spent on the css. When I get around to doing the bigger web project I’ve got in mind I’ll have a good idea about how to do it.

Not much progress on this program. I’ve worked out exactly what the problem with non-standard characters is, but fixing it isn’t straightforward thanks to the native methods I had to use to get accurate measurements of the fonts.


Bugs, and languages and Xml

Found a big and obvious bug with the batch conversions settings form, where half of the text was missing. Either nobody reported it, or nobody noticed, so I’m not going to rush a new version out today. Seriously, if you ever find anything then please just click on the “report a bug” link over to the right and tell me about it (you don’t need to log in to post).

While I was there, I finished formalizing the localization strings so it will be easy for people to translate into other languages. It’ll just need people to go through and edit a copy of this file, translating the values fields:
 <data name="String in English">
  <value>String in other language</value>
 </data>

Not yet sure exactly how it’s going to work. Maybe through setting up a small wiki-style thing so anyone interested can just edit the page for their language.

In other code, there have been a lot of internal changes so all the default settings are in one place rather then buried in the code. I’m working on a way to store them in an xml file (saving xml done, no problem), and load them when the program starts (loading xml? convoluted and confusing).


Headaches and cleartypes

Very little progress since the last release. Mainly because my main computer’s monitor decided to go ever so slightly but permanently out of focus, and the first thing I knew about it was from the blinding headaches after using the computer for more then a few hours. One lovely big new Samsung TFT later and things seem to be ok (:touchwood:), now I just need something to fill the huge inaccessible gap on a corner desk specifically designed for a deep monitor.

This has all let me find out about Cleartype, and the problems it causes with the program. Having Cleartype turned on gives a different output, and it also slows down the display speed when you adjust the text image. I can’t really say if it’s better on or off, since either way the auto-ramp stuff gives the best output. A quick search shows that it should be possible to turn it off for the textbox and all the image stuff, so I’ll look into an option for that, it’s just annoying that there’s another thing to consider when you post the output as text.


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.