@pervognsen I had a similar thing. From the commit message:
This utility splits the input image to some number of font cell sized blocks. Then, for each block it searches for two dominant colors. When the colors are found, it iterates through every character in font to find one that gives the best approximation of the original image block.
It was offline, so brute force search was ok. K-means were used to find the two colors, in Lab.
@pervognsen Well, there's the aalib, and libcaca (http://caca.zoy.org/wiki/libcaca) if you also want color. These were everywhere back when people still thought this Windows 95 everything is graphics thing will not catch on – video players, quake ports, and so on.
I only took a cursory look at the article, so I can't comment too much about the method, but it doesn't look that temporally stable to me. The stability that is there is due to limited amount of characters used.
@pervognsen I see he uses 6 sampling areas to approximate the letter shape. This is basically blurring, so the highest frequencies go away.
In my solution I used a proxy 8x8 font with which I calculated error for every pixel of the block. This was not ideal, as in the actual game you had a selection of variety of high-resolution monospace fonts. The font in game also has a shadow, and that had to be included in the error calculation.