Struct norad::Glyph[][src]

pub struct Glyph {
    pub name: GlyphName,
    pub format: GlifVersion,
    pub height: f64,
    pub width: f64,
    pub codepoints: Vec<char>,
    pub note: Option<String>,
    pub guidelines: Vec<Guideline>,
    pub anchors: Vec<Anchor>,
    pub components: Vec<Component>,
    pub contours: Vec<Contour>,
    pub image: Option<Image>,
    pub lib: Plist,
}
Expand description

A glyph, loaded from a .glif file.

Fields

name: GlyphNameformat: GlifVersionheight: f64width: f64codepoints: Vec<char>note: Option<String>guidelines: Vec<Guideline>anchors: Vec<Anchor>components: Vec<Component>contours: Vec<Contour>image: Option<Image>lib: Plist

Implementations

Serialize the glyph into an XML byte stream.

The order of elements and attributes follows ufonormalizer where possible.

Load the glyph at this path.

When loading glyphs in bulk, load_with_names should be preferred, since it will allow glyph names (in glyphs and components) to be shared between instances.

Create a new glyph with the given name.

Returns boolean value indicating whether Glyph is defined with one or more Component.

Returns a usize that represents the number of Component defined on the Glyph.

Returns boolean indicating the presence of one or more Component with base glyph name basename.

Return a iterator over immutable Component references filtered by base glyph name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.