Trait Font Source
pub trait FontSource {
// Required methods
fn catalog(&self) -> &FontCatalog;
fn load(&self, selection: FontSelection) -> Result<TextFont, FontError>;
}Required Methods§
fn catalog(&self) -> &FontCatalog
fn load(&self, selection: FontSelection) -> Result<TextFont, FontError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl FontSource for SystemFontCatalog
Available on macOS only.
impl FontSource for SystemFontCatalog
Available on macOS only.