The package provides a parser for OpenType fonts.
```rust extern crate opentype;
use opentype::File; use opentype::truetype::NamingTable;
let path = "SourceSerifPro-Regular.otf"; let font = Font::open(path).unwrap();
asserteq!(file.fontheader.asref().unwrap().unitsPerEm, 1000); asserteq!(file.horizontalheader.asref().unwrap().ascender, 918); let strings = match file.namingtable { Some(NamingTable::Format0(ref table)) => table.strings().unwrap(), _ => unreachable!(), }; asserteq!(&strings[1], "Source Serif Pro"); assert_eq!(&strings[9], "Frank Grießhammer"); ```