Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.85 KB

File metadata and controls

57 lines (37 loc) · 1.85 KB

crates.io docs.rs Continuous integration

Norad

A crate for reading, writing, and manipulating Unified Font Object files, a common font-design format.

The types in this crate correspond to types described in the spec.

Basic Usage

Instantiate a UFO font object with a Font struct like this:

use norad::Font;

let inpath = "RoflsExtraDim.ufo";
let mut font_obj = Font::load(inpath).expect("failed to load font");

The API may be used to access and modify data in the Font:

let layer = font_obj.default_layer();
let glyph_a = layer.get_glyph("A").expect("missing glyph");
assert_eq!(glyph_a.name().as_ref(), "A");

Serialize the Font to UFO files on disk with the Font::save method:

let outpath = "RoflsSemiDim.ufo";
font_obj.save(outpath);

Refer to the examples directory of the source repository for additional source code examples.

API Documentation

Details on the full API for working with UFO fonts are available on docs.rs.

License

norad is licensed under the MIT and Apache v2.0 licenses.

Source

Source files are available on GitHub.