[−][src]Crate norad
Utilties for working with Universal Font Object files.
Basic usage:
use norad::Ufo; let path = "RoflsSansLight.ufo"; let mut font_obj = Ufo::load(path).expect("failed to load font"); let layer = font_obj.find_layer(|layer| layer.name == "glyphs").unwrap(); 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; |
pub use glyph::Glyph; |
pub use glyph::GlyphName; |
Modules
error | Errors, errors, errors |
fontinfo | |
glyph | Data related to individual glyphs. |
Structs
Color | A color. |
Guideline | A guideline associated with a glyph. |
Identifier | Identifiers are optional attributes of several objects in the UFO. These identifiers are required to be unique within certain contexts as defined on a per object basis throughout this specification. Identifiers are specified as a string between one and 100 characters long. All characters must be in the printable ASCII range, 0x20 to 0x7E. |
IntegerOrFloat | IntegerOrFloat represents a number that can be an integer or float. It should serialize to an integer if it effectively represents one. |
Layer | A layer, corresponding to a 'glyphs' directory. Conceptually, a layer is just a collection of glyphs. |
LayerInfo | A font layer, along with its name and path. |
MetaInfo | The contents of the |
NonNegativeIntegerOrFloat | NonNegativeIntegerOrFloat represents a number that can be a NonNegative integer or float. It should serialize to an integer if it effectively represents one. |
Ufo | A Unified Font Object. |
Enums
FormatVersion | A version of the UFO spec. |
Line | An infinite line. |