Crate norad[][src]

Expand description

Utilties for working with Unified Font Object files.

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

Basic usage:

use norad::Font;

let path = "RoflsExtraDim.ufo";
let mut font_obj = Font::load(path).expect("failed to load 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");

Re-exports

pub use error::Error;
pub use fontinfo::FontInfo;

Modules

error

Error types.

fontinfo

The contents of fontinfo.plist.

util

Common utilities.

Structs

AffineTransform

A 2D affine transformation.

Anchor

An reference position in a glyph, such as for attaching accents.

Color

A color.

Component

A reference to another glyph, to be included in this glyph’s outline.

Contour

A single open or closed bezier path segment.

ContourPoint

A single point in a Contour.

DataRequest

A type that describes which components of a UFO should be loaded.

Font

A Unified Font Object.

Glyph

A glyph, loaded from a .glif file.

Guideline

A guideline associated with a glyph.

Identifier

A UFO Object Identifier.

Image

An image included in a glyph.

IntegerOrFloat

A number that may be either an integer or float.

Layer

A layer, corresponding to a ‘glyphs’ directory. Conceptually, a layer is just a collection of glyphs.

LayerSet

A collection of Layer objects.

MetaInfo

The contents of the metainfo.plist file.

NonNegativeIntegerOrFloat

A number that can be a non-negative integer or float.

Enums

FormatVersion

A version of the UFO spec.

GlifVersion
Line

An infinite line.

PointType

Possible types of points that can exist in a Contour.

Type Definitions

GlyphName

The name of a glyph.

Plist

A Plist dictionary.