Infer.Font (Infer v0.1.0) View Source
Font type matchers based on the magic number
Link to this section Summary
Functions
Takes the binary file contents as arguments. Returns true
if it's a otf font.
Takes the binary file contents as arguments. Returns true
if it's a ttf font.
Takes the binary file contents as arguments. Returns true
if it's a woff font.
Takes the binary file contents as arguments. Returns true
if it's a woff2 font.
Link to this section Functions
Specs
Takes the binary file contents as arguments. Returns true
if it's a otf font.
Specs
Takes the binary file contents as arguments. Returns true
if it's a ttf font.
Examples
iex> binary = File.read!("test/fonts/sample.ttf")
iex> Infer.Font.is_ttf(binary)
true
Specs
Takes the binary file contents as arguments. Returns true
if it's a woff font.
Specs
Takes the binary file contents as arguments. Returns true
if it's a woff2 font.