Struct norad::Glyph [−][src]
pub struct Glyph { pub name: GlyphName, pub format: GlifVersion, pub height: f32, pub width: f32, 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: GlyphName
format: GlifVersion
height: f32
width: f32
codepoints: Vec<char>
note: Option<String>
guidelines: Vec<Guideline>
anchors: Vec<Anchor>
components: Vec<Component>
contours: Vec<Contour>
image: Option<Image>
lib: Plist
Implementations
impl Glyph
[src]
impl Glyph
[src]pub fn encode_xml(&self) -> Result<Vec<u8>, GlifWriteError>
[src]
pub fn encode_xml(&self) -> Result<Vec<u8>, GlifWriteError>
[src]Serialize the glyph into an XML byte stream.
The order of elements and attributes follows ufonormalizer where possible.
impl Glyph
[src]
impl Glyph
[src]pub fn load(path: impl AsRef<Path>) -> Result<Self, Error>
[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]
Trait Implementations
impl StructuralPartialEq for Glyph
[src]
Auto Trait Implementations
impl RefUnwindSafe for Glyph
impl Send for Glyph
impl Sync for Glyph
impl Unpin for Glyph
impl UnwindSafe for Glyph
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more