Crate font [] [src]

Font toolbox.

Example

extern crate font;

use font::File;
use font::Operation::*;

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

for operation in glyph.iter() {
    match operation {
        &CurveTo(..) => println!("Curve!"),
        &LineTo(..) => println!("Line!"),
        &MoveTo(..) => println!("Move!"),
    }
}

Structs

File

A file.

Font

A font.

Glyph

A glyph.

Enums

Operation

An operation.

Traits

Case

A collection of glyphs.

Type Definitions

Error

An error.

Point

A point.

Result

A result.