[][src]Trait badgen::Font

pub trait Font {
    fn height(&self) -> u32;
fn render_glyph<'a>(&'a mut self, c: char) -> Option<FontGlyph<'a>>; fn scale(&self) -> f32 { ... }
fn precision(&self) -> u8 { ... } }

A Font trait specific to badge generation.

Required methods

fn height(&self) -> u32

The font height relative to the badge viewbox.

fn render_glyph<'a>(&'a mut self, c: char) -> Option<FontGlyph<'a>>

Render a character glyph if it exists.

Loading content...

Provided methods

fn scale(&self) -> f32

The scale of the font used in path rendering.

fn precision(&self) -> u8

The precision of the font used in path rendering.

Loading content...

Implementors

impl<'a> Font for TrueTypeFont<'a>[src]

impl<T> Font for CachedFont<T> where
    T: Font
[src]

Loading content...