Struct fonterator::Font
[−]
[src]
pub struct Font<'a> { /* fields omitted */ }
A single font. This may or may not own the font data.
Methods
impl<'a> Font<'a>
[src]
pub fn new<B: Into<SharedBytes<'a>>>(bytes: B) -> Result<Font<'a>, Error>
[src]
Constructs a font from an array of bytes, this is a shortcut for
FontCollection::new
for collections comprised of a single font.
pub fn units_per_em(&self) -> u16
[src]
Returns the units per EM square of this font
pub fn glyph_count(&self) -> usize
[src]
The number of glyphs present in this font. Glyph identifiers for this
font will always be in the range 0..self.glyph_count()
ⓘImportant traits for GlyphIterator<'a>pub fn glyphs<T: ToString>(
&'a self,
text: T,
scale: (f32, f32)
) -> GlyphIterator<'a>
[src]
ⓘImportant traits for GlyphIterator<'a>
&'a self,
text: T,
scale: (f32, f32)
) -> GlyphIterator<'a>
Get an iterator over the glyphs in a string.