Skip to content

Repository files navigation

Font PackageDocumentationBuild

The package provides a builder and parser for fonts.

use font::glyph::Segment;use font::File;macro_rules! ok(($result:expr) => ($result.unwrap()));let path = "SourceSerifPro-Regular.otf";letFile{mut fonts } = ok!(File::open(path));let glyph = ok!(ok!(fonts[0].glyph('a')));for contour in glyph.iter(){for segment in contour.iter(){match segment {&Segment::Linear(..) => {/* … */},&Segment::Quadratic(..) => {/* … */},&Segment::Cubic(..) => {/* … */},}}}

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.

About

Builder and parser for fonts

Topics

Resources

Stars

42 stars

Watchers

3 watching

Forks

Used by

Contributors

Languages