How to convert a bitmap font (.FON) into a truetype font (.TTF)?

Viewed 72339

My program (win32, Delphi) needs to display special chars in some columns of a table. To do that I use a special font for those columns. I got the font from my client. It is a .FON font. It works good on the screen but I often get problems as soon as I want to use it to print something.

I would like to convert this .FON font into to truetype font (.TTF) to avoid the problems. I don't care if the font does not scale good. I should just looks exactly the same when used on the screen with the same size as the default size of the original font. Do someone know a way to do that?

(It don't necessary need a source code solution. The font won't change. It's enough if I find a tool to do it)

Edit: Ideal would be to get a truetype font where each pixel of the original font is converted into a vectorial black square (I tested by redrawing a few chars manually, it would works as I want).

Edit 2, solution used: Using FontForge + Autotrace and then making corrections manually I was able to get a vector font that follow the outline of the pixels of the bitmap font. This vector font scales somewhat better than the original font and solve my printing problems. See accepted post for details.

But I'm still interested if someone knows a fully automated solution.

12 Answers

Autotrace seems to produce a pixel perfect output, if the input is scaled, I made some tests and scaling at least 8× works perfectly.

After opening the bitmap font in FontForge, Open - > Element - > Bitmap Strikes, and create a bitmap strike of 8× the resolution (for example: if 16, then 128). Then save this bitmap strike as a bitmap font (e. g. bdf).

Perform the "Autotrace" on this scaled output.

There are more points than needed, this can be resolved by using Element\Simplify\Simplify, this will simplify the outlines. In this specific case of the outlines being made of only horizontal and vertical lines, this operation should be lossless.

It's automated, making it much easier for fonts with tons of characters than redrawing all the characters manually. This should definitely be useful for anyone who drew bitmap glyphs and has a valid bitmap font file but cannot use it yet (Microsoft's .fon format does not support Unicode, and many applications fail to properly utilize true bitmap fonts).

After hours of working with different font editors and applying the mentioned methods, they could not do the conversion well.

But, I suddenly found that Vertopal (a free file converter) has a fon to ttf converter and several other font converters, it quickly converted fon to ttf with the same original characters and the correct size.

Vertopal fon to ttf converter
You can also apply custom settings to the conversion, however, these defaults did the best conversion for me.

Related