Expand description
Font toolbox.
Example
use font::{Font, Segment};
let path = "OpenSans-Italic.ttf";
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
Enums
A segment.
Traits
A collection of glyphs.