Crate font [−] [src]
Font toolbox.
Example
extern crate font; use font::{File, Segment}; let path = "SourceSerifPro-Regular.otf"; let File { fonts, .. } = File::open(path).unwrap(); let glyph = fonts[0].draw('&').unwrap().unwrap(); for contour in glyph.iter() { for segment in contour.iter() { match segment { &Segment::Linear(..) => { /* … */ }, &Segment::Quadratic(..) => { /* … */ }, &Segment::Cubic(..) => { /* … */ }, } } }
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. |