pub struct Glyph { /* private fields */ }Expand description
A single glyph in a font
Implementations§
Source§impl Glyph
impl Glyph
Sourcepub fn unicode_range(&self) -> &str
pub fn unicode_range(&self) -> &str
Returns the unicode range for the glyph
Sourcepub fn outline(&self) -> &SimpleGlyf
pub fn outline(&self) -> &SimpleGlyf
Returns the raw outline data of this glyph
Compound glyphs will be simplified to a single outline
Sourcepub fn svg_preview(&self) -> String
pub fn svg_preview(&self) -> String
Returns the SVG data of this glyph’s outline
Sourcepub fn svgz_preview(&self) -> Result<Vec<u8>>
Available on crate feature extended-svg only.
pub fn svgz_preview(&self) -> Result<Vec<u8>>
extended-svg only.Returns the gzip compressed SVGZ data of this glyph
§Errors
Returns an error if the data cannot be compressed
Sourcepub fn svg_dataimage_url(&self) -> Result<String>
Available on crate feature extended-svg only.
pub fn svg_dataimage_url(&self) -> Result<String>
extended-svg only.Generates a data: link containing the outline svg data for this glyph
§Errors
Returns an error if the data cannot be encoded properly
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Glyph
impl RefUnwindSafe for Glyph
impl Send for Glyph
impl Sync for Glyph
impl Unpin for Glyph
impl UnwindSafe for Glyph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more