FON

application/octet-stream

Safe

Magic Bytes

Offset: 0
4D 5A

The FON file format is a legacy font resource library developed by Microsoft for use within the Windows operating system environment. These files primarily function as executable containers storing fixed-size bitmap font data used for system interfaces, dialog boxes, and command prompt windows. Structurally identical to 16-bit Windows executable libraries, this format has largely been superseded by vector-based TrueType and OpenType standards but remains present for backward compatibility.

Extension

.fon

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .fon files in Python

Python
def is_fon(file_path: str) -> bool:
    """Check if file is a valid FON by magic bytes."""
    signature = bytes([0x4D, 0x5A])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .fon files in Node.js

Node.js
function isFON(buffer: Buffer): boolean {
  const signature = Buffer.from([0x4D, 0x5A]);
  return buffer.subarray(0, 2).equals(signature);
}
Go
func IsFON(data []byte) bool {
    signature := []byte{0x4D, 0x5A}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

GET /api/v1/fon
curl https://filesignature.org/api/v1/fon

Related Formats