font 0.0.10

The package provides a font toolbox.
Documentation

Font Version Status

The package provides a font toolbox.

Documentation

Example

use font::{File, Segment};

let path = "SourceSerifPro-Regular.otf";
let file = File::open(path).unwrap();
let glyph = file[0].draw('&').unwrap().unwrap();

for contour in glyph.iter() {
    for segment in contour.iter() {
        match segment {
            &Segment::Linear(..) => println!("Line!"),
            &Segment::Quadratic(..) => println!("Curve!"),
            &Segment::Cubic(..) => println!("Curve!"),
        }
    }
}

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.