Skip to main content

FontResolver

Trait FontResolver 

Source
pub trait FontResolver: Sync + Send {
    // Required method
    fn resolve(&self, font: &Font, database: &mut Arc<Database>) -> Option<ID>;
}
Expand description

An interface for resolving font families and styles for SVG images.

Required Methods§

Source

fn resolve(&self, font: &Font, database: &mut Arc<Database>) -> Option<ID>

Attempt to resolve a font reference using the provided database of fonts. Adding new fonts to the database is allowed. Return an index into the database if the font resolves to an entry, otherwise return None.

Implementors§