[−][src]Trait printpdf::types::plugins::graphics::two_dimensional::font::FontData
Provides access to font metrics.
Per default, printpdf uses rusttype
to extract the font data. You can implement this
trait for other types if you want to use a different font backend.
Required methods
pub fn font_metrics(&self) -> FontMetrics
[src]
Returns the unscaled metrics for this font.
pub fn glyph_id(&self, c: char) -> Option<u16>
[src]
Returns the glyph id for a Unicode character if it is present in this font.
pub fn glyph_ids(&self) -> HashMap<u16, char>
[src]
Returns a mapping from glyph IDs to Unicode characters for all supported characters.
pub fn glyph_metrics(&self, glyph_id: u16) -> Option<GlyphMetrics>
[src]
Returns the glyph metrics for a glyph of this font, if available.