[−][src]Struct norad::glyph::Glyph
A glyph, loaded from a .glif file.
Fields
name: GlyphName
format: GlifVersion
advance: Option<Advance>
codepoints: Option<Vec<char>>
note: Option<String>
guidelines: Option<Vec<Guideline>>
anchors: Option<Vec<Anchor>>
outline: Option<Outline>
image: Option<Image>
lib: Option<Plist>
Implementations
impl Glyph
[src]
pub fn encode_xml(&self) -> Result<Vec<u8>, GlifWriteError>
[src]
impl Glyph
[src]
pub fn load(path: impl AsRef<Path>) -> Result<Self, Error>
[src]
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.
pub fn load_with_names(path: &Path, names: &NameList) -> Result<Self, Error>
[src]
pub fn new_named<S: Into<GlyphName>>(name: S) -> Self
[src]
Create a new glyph with the given name.
pub fn advance_width(&self) -> Option<f32>
[src]
If this glyph has an advance, return the width value.
This is purely a convenience method.
Trait Implementations
impl Clone for Glyph
[src]
impl Debug for Glyph
[src]
impl PartialEq<Glyph> for Glyph
[src]
impl StructuralPartialEq for Glyph
[src]
Auto Trait Implementations
impl RefUnwindSafe for Glyph
[src]
impl Send for Glyph
[src]
impl Sync for Glyph
[src]
impl Unpin for Glyph
[src]
impl UnwindSafe for Glyph
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,