Expand description
Parser for fonts in Web Open Font Format.
Example
use webtype::opentype::truetype::FontHeader;
use webtype::File;
macro_rules! ok(($result:expr) => ($result.unwrap()));
let path = "NotoNaskhArabic-Regular.woff2";
let mut tape = ok!(std::fs::File::open(path));
let File { mut fonts, mut tape } = ok!(File::read(&mut tape));
let font_header = ok!(ok!(fonts[0].take::<_, FontHeader>(&mut tape)));
assert_eq!(font_header.units_per_em, 2048);
Re-exports
pub extern crate opentype;
Modules
- The Web Open Font Format of version 1.0.
- The Web Open Font Format of version 2.0.
Structs
- A file.
- A font.
- A four-byte unsigned integer with a variable-length encoding.
Traits
- A type that can read.
- A type that can be read.
- A type that can be read given a parameter.
Functions
- Check if a tag is recognized.
Type Definitions
- An error.
- A result.