Skip to main content

FontLoader

Trait FontLoader 

Source
pub trait FontLoader {
    // Required method
    fn load(&self, spec: &FontSpec) -> Result<FontData, FontError>;
}
Expand description

Loads font faces for the engine, the only font trait a host implements.

Required Methods§

Source

fn load(&self, spec: &FontSpec) -> Result<FontData, FontError>

Returns the face a spec names, with a key the host chooses to identify it in the IR.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> FontLoader for &T
where T: FontLoader + ?Sized,

Implementors§