EOT
application/vnd.ms-fontobject
Magic Bytes
Offset: 8
02 00 02 00
Embedded OpenType (EOT) is a proprietary font format developed by Microsoft for embedding custom typefaces into web documents. It was primarily used by Internet Explorer to facilitate the display of specific fonts not installed on a user's local operating system. Although the format includes compression and basic digital rights management, it is now considered legacy and has been largely replaced by the WOFF and WOFF2 standards across modern web browsers.
Validation Code
How to validate .eot files in Python
Python
def is_eot(file_path: str) -> bool:
"""
Check if file is a valid EOT by magic bytes.
Signature offset: 8 bytes
"""
signature = bytes([0x02, 0x00, 0x02, 0x00])
with open(file_path, "rb") as f:
f.seek(8)
return f.read(4) == signature
How to validate .eot files in Node.js
Node.js
function isEOT(buffer: Buffer): boolean {
// Signature offset: 8 bytes
const signature = Buffer.from([0x02, 0x00, 0x02, 0x00]);
if (buffer.length < 12) return false;
return buffer.subarray(8, 12).equals(signature);
}
Go
func IsEOT(data []byte) bool {
// Signature offset: 8 bytes
signature := []byte{0x02, 0x00, 0x02, 0x00}
if len(data) < 12 {
return false
}
return bytes.Equal(data[8:12], signature)
}
API Endpoint
GET
/api/v1/eot
curl https://filesignature.org/api/v1/eot