[][src]Function infer::is_font

pub fn is_font(buf: &[u8]) -> bool

Determines whether a buffer is a font type.

Examples

use std::fs;
assert!(infer::is_font(&fs::read("testdata/sample.ttf").unwrap()));