Trait FontResolver

Source
pub trait FontResolver {
    // Required methods
    fn font_book(&self) -> &LazyHash<FontBook>;
    fn font(&self, idx: usize) -> Option<Font>;

    // Provided methods
    fn revision(&self) -> Option<NonZeroUsize> { ... }
    fn default_get_by_info(&self, info: &FontInfo) -> Option<Font> { ... }
    fn get_by_info(&self, info: &FontInfo) -> Option<Font> { ... }
}
Expand description

A FontResolver can resolve a font by index. It also reuse FontBook for font-related query. The index is the index of the font in the FontBook.infos.

Required Methods§

Source

fn font_book(&self) -> &LazyHash<FontBook>

Source

fn font(&self, idx: usize) -> Option<Font>

Provided Methods§

Implementors§