Struct fonterator::Font
source · pub struct Font<'a> { /* private fields */ }
Expand description
A single font. This may or may not own the font data.
Implementations
sourceimpl<'a> Font<'a>
impl<'a> Font<'a>
sourcepub fn new<B: Into<SharedBytes<'a>>>(bytes: B) -> Result<Font<'a>, Error>
pub fn new<B: Into<SharedBytes<'a>>>(bytes: B) -> Result<Font<'a>, Error>
Constructs a font from an array of bytes, this is a shortcut for
FontCollection::new
for collections comprised of a single font.
sourcepub fn units_per_em(&self) -> u16
pub fn units_per_em(&self) -> u16
Returns the units per EM square of this font
sourcepub fn glyph_count(&self) -> usize
pub fn glyph_count(&self) -> usize
The number of glyphs present in this font. Glyph identifiers for this
font will always be in the range 0..self.glyph_count()
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Font<'a>
impl<'a> Send for Font<'a>
impl<'a> Sync for Font<'a>
impl<'a> Unpin for Font<'a>
impl<'a> UnwindSafe for Font<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more