pub struct Glyph { /* private fields */ }Expand description
A single glyph in a font
Implementations§
Source§impl Glyph
impl Glyph
Sourcepub const fn new(
codepoint: u32,
name: &'static str,
preview: GlyphPreview,
) -> Glyph
pub const fn new( codepoint: u32, name: &'static str, preview: GlyphPreview, ) -> Glyph
Creates a new glyph with the specified codepoint, name, and preview data
Sourcepub fn unicode_range(&self) -> &'static str
pub fn unicode_range(&self) -> &'static str
Returns the unicode range for the glyph
Sourcepub fn outline(&self) -> &GlyphPreview
pub fn outline(&self) -> &GlyphPreview
Returns the raw visual 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
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