Where I can find .fon format specification?

HolyBlackCat picture HolyBlackCat · Dec 14, 2014 · Viewed 12.2k times · Source

I'm thinking about making a bitmap font editor, but I'm completely unable to find any information about .fon internal structure.

Someone knows where I can find it? Or the only solution is to analyse these files myself?

Answer

djangodude picture djangodude · Dec 15, 2014

I will preface this by mentioning that "FON" has become a somewhat common file extension for several different font formats. By far the most common is Microsoft's, but there are other files calling themselves FON which use a completely different format. So you may want to double-check that. The information I include below is only about the Microsoft format.

FON is actually just EXE format, which is to say: FON files are EXEs that contain font resources (and only font resources), renamed with file extension FON. There is more information about that in this very old documentation written around the time FON was introduced.

You are probably actually interested in the font resource format, known as FNT. Microsoft has good documentation on that.

Essentially what you do is create your FNT resources, then compile them as if they were a Windows Executable (you may include several FNTs in a FON; typically what is done is to package multiple sizes of the same font into a single FON).