VF
application/x-tex-virtual-font
Magic Bytes
Offset: 0
F7 CA
The VF format is a binary font type developed by Donald Knuth and maintained within the TeX Live ecosystem. It functions as a lookup table that enables DVI drivers to map individual characters to glyphs from multiple fonts or to perform specific character transformations. As a legacy format primarily used in traditional publishing workflows, it is considered safe due to its lack of support for external scripting or active content.
Validation Code
How to validate .vf files in Python
Python
def is_vf(file_path: str) -> bool:
"""Check if file is a valid VF by magic bytes."""
signature = bytes([0xF7, 0xCA])
with open(file_path, "rb") as f:
return f.read(2) == signature
How to validate .vf files in Node.js
Node.js
function isVF(buffer: Buffer): boolean {
const signature = Buffer.from([0xF7, 0xCA]);
return buffer.subarray(0, 2).equals(signature);
}
Go
func IsVF(data []byte) bool {
signature := []byte{0xF7, 0xCA}
if len(data) < 2 {
return false
}
return bytes.Equal(data[:2], signature)
}
API Endpoint
GET
/api/v1/vf
curl https://filesignature.org/api/v1/vf