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.
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.
Details on the full API for working with UFO fonts are available on docs.rs.
norad is licensed under the MIT and Apache v2.0 licenses.
Source files are available on GitHub.