ACFM
application/x-font-adobe-metric
Magic Bytes
Offset: 0
53 74 61 72 74 46 6F 6E 74 4D 65 74 72 69 63 73
Adobe Core Font Metrics (ACFM) is a legacy font metadata format developed by Adobe Systems for use with PostScript Type 1 fonts. It serves as a master container for essential typographic layout data, including character spacing, kerning pairs, and sizing information required by the Adobe Type Manager. As a non-executable data format, ACFM files are considered safe, though they are now largely obsolete having been replaced by the universal OpenType standard.
Validation Code
How to validate .acfm files in Python
Python
def is_acfm(file_path: str) -> bool:
"""Check if file is a valid ACFM by magic bytes."""
signature = bytes([0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x6F, 0x6E, 0x74, 0x4D, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .acfm files in Node.js
Node.js
function isACFM(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x6F, 0x6E, 0x74, 0x4D, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73]);
return buffer.subarray(0, 16).equals(signature);
}
Go
func IsACFM(data []byte) bool {
signature := []byte{0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x6F, 0x6E, 0x74, 0x4D, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
GET
/api/v1/acfm
curl https://filesignature.org/api/v1/acfm