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