Crate font [−] [src]
Font toolbox.
Example
extern crate font; use font::{File, Segment}; let path = "SourceSerifPro-Regular.otf"; let file = File::open(path).unwrap(); let font = &file[0]; for contour in font.draw('&').unwrap().unwrap().iter() { for segment in contour.iter() { match segment { &Segment::Linear(..) => println!("Line!"), &Segment::Quadratic(..) => println!("Curve!"), &Segment::Cubic(..) => println!("Curve!"), } } }
Structs
Contour |
A contour. |
File |
A file. |
Font |
A font. |
Glyph |
A glyph. |
Offset |
An offset. |
Enums
Segment |
A segment. |
Traits
Case |
A collection of glyphs. |
Type Definitions
Error |
An error. |
Number |
A number. |
Result |
A result. |