{"success":true,"data":{"ext":"pfm","name":"PFM","description":"Printer Font Metrics (PFM) is a legacy font-metric file format introduced by Microsoft and used by Windows to store printer-specific information for Type 1 fonts. It is used by font managers, printer drivers, and desktop publishing software to map character widths, kerning, and related metrics for accurate text rendering. The format is generally safe, but it is obsolete in modern workflows and may be encountered when working with older font packages.","mime":["application/x-font-printer-metric"],"risk_level":"Safe","signatures":[{"hex":"00 01 FF FF 00 00 43 6F 70 79 72","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"}]}],"related":["afm","eot","otf","pfa","pfb","ttc"],"usage":{"python":"def is_pfm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PFM by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72])\n    with open(file_path, \"rb\") as f:\n        return f.read(11) == signature","node":"function isPFM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72]);\n  return buffer.subarray(0, 11).equals(signature);\n}","go":"func IsPFM(data []byte) bool {\n    signature := []byte{0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72}\n    if len(data) < 11 {\n        return false\n    }\n    return bytes.Equal(data[:11], signature)\n}"},"category":"Fonts"}}