FNT (Windows Font)
(→Identification) |
(→Identification: Copy-editing) |
||
Line 7: | Line 7: | ||
== Identification == | == Identification == | ||
− | Such fonts files begin with a nil-byte. | + | Such fonts files begin with a nil-byte. The next byte contains a value in range from one to three. These two bytes correspond to the version of the font file. |
− | The next byte contains a value in range from one to three. | + | |
− | These two bytes | + | Then the file size is stored as a 4 byte little endian value. Since a font can contain a maximum of 255 characters and a few bytes are required per character description, this size is usually in the thousands. Since the file header alone is more than 100 bytes, the size of a theoretically minimal FNT file with only one character is larger than 100. |
− | Then the file size is stored as 4 byte little endian value. | + | |
− | Since a font can contain a maximum of 255 characters and a few bytes are required per character description, this size is usually in the thousands | + | From offset 80 three properties of the font are saved in one byte each. These font properties are italic, underlined and strikeout. If the font has the property in question, the corresponding value is one. Otherwise the value is zero. |
− | Since the file header | + | |
− | From offset 80 three properties of the font are saved in one byte each. These font properties are italic, underlined and strikeout. | + | |
− | If the font has the property in question, the corresponding value is one. Otherwise the value is zero. | + | |
== Software == | == Software == |
Revision as of 20:21, 31 January 2021
FNT is a mostly-obsolete bitmap or stroked (vector) font format associated with Microsoft Windows. FNT-format fonts are most commonly found inside resources of New Executable (sometimes Portable Executable) files, particularly in dedicated FON (.fon
) files. They may also appear standalone (without a container), where they have the extension .fnt
.
Contents |
Identification
Such fonts files begin with a nil-byte. The next byte contains a value in range from one to three. These two bytes correspond to the version of the font file.
Then the file size is stored as a 4 byte little endian value. Since a font can contain a maximum of 255 characters and a few bytes are required per character description, this size is usually in the thousands. Since the file header alone is more than 100 bytes, the size of a theoretically minimal FNT file with only one character is larger than 100.
From offset 80 three properties of the font are saved in one byte each. These font properties are italic, underlined and strikeout. If the font has the property in question, the corresponding value is one. Otherwise the value is zero.
Software
Sample files
Links
- Windows Developers Notes: Font-File Format - Covers versions 2 and 3 of the format.
- Windows 1.03 Programmer's Reference (PDF) - Appendix C describes version 1 of the format.
- MSDN: CharacterSet Enumeration - Codes used by the dfCharSet field
- mkwinfont