{"success":true,"data":{"ext":"ttf","name":"TrueType font file","description":"TrueType Font (TTF) is a digital font file format developed by Apple and later adopted by Microsoft, with support maintained by operating system and font software vendors. It is used for on-screen text, printing, and document embedding in desktop publishing, office software, and web-related workflows. Although generally safe, fonts can contain malformed data that may trigger parsing bugs, and TTF is now a legacy format in some modern font ecosystems.","mime":["application/x-font-ttf"],"risk_level":"Safe","signatures":[{"hex":"00 01 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"00 01 00 00","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"74 72 75 65 00","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["ttc","dfont","otf","afm","eot","pfa"],"usage":{"python":"def is_ttf(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TTF by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x01, 0x00, 0x00, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(5) == signature","node":"function isTTF(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x01, 0x00, 0x00, 0x00]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsTTF(data []byte) bool {\n    signature := []byte{0x00, 0x01, 0x00, 0x00, 0x00}\n    if len(data) < 5 {\n        return false\n    }\n    return bytes.Equal(data[:5], signature)\n}"},"category":"Fonts"}}