Crate font[−][src]
Font toolbox.
Example
extern crate font; use font::{Font, Segment}; let path = "SourceSerifPro-Regular.otf"; let font = Font::open(path).unwrap(); let glyph = font.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. |