pub struct Table<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> Table<'a>
impl<'a> Table<'a>
Sourcepub fn number_of_glyphs(&self) -> u16
pub fn number_of_glyphs(&self) -> u16
Returns a total number of glyphs in the font.
Never zero.
Sourcepub fn outline(
&self,
glyph_id: GlyphId,
builder: &mut dyn OutlineBuilder,
) -> Result<Rect, CFFError>
pub fn outline( &self, glyph_id: GlyphId, builder: &mut dyn OutlineBuilder, ) -> Result<Rect, CFFError>
Outlines a glyph.
Sourcepub fn glyph_index(&self, code_point: u8) -> Option<GlyphId>
pub fn glyph_index(&self, code_point: u8) -> Option<GlyphId>
Resolves a Glyph ID for a code point.
Similar to Face::glyph_index
but 8bit
and uses CFF encoding and charset tables instead of TrueType cmap
.
Sourcepub fn glyph_width(&self, glyph_id: GlyphId) -> Option<u16>
pub fn glyph_width(&self, glyph_id: GlyphId) -> Option<u16>
Returns a glyph width.
This value is different from outline bbox width and is stored separately.
Technically similar to Face::glyph_hor_advance
.
Sourcepub fn glyph_index_by_name(&self, name: &str) -> Option<GlyphId>
pub fn glyph_index_by_name(&self, name: &str) -> Option<GlyphId>
Returns a glyph ID by a name.
Sourcepub fn glyph_name(&self, glyph_id: GlyphId) -> Option<&'a str>
pub fn glyph_name(&self, glyph_id: GlyphId) -> Option<&'a str>
Returns a glyph name.
Trait Implementations§
impl<'a> Copy for Table<'a>
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
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