pub trait Font {
// Required methods
fn is_empty_fallback(&self) -> bool;
fn renderer_id(
&self,
renderer: &ViewRenderer,
synthesis: FontSynthesis,
) -> FontId;
}Expand description
A text font.
This trait is an interface for the renderer into the font API used in the application.
Required Methods§
Sourcefn is_empty_fallback(&self) -> bool
fn is_empty_fallback(&self) -> bool
Gets if the font is the fallback that does not have any glyph.
Sourcefn renderer_id(
&self,
renderer: &ViewRenderer,
synthesis: FontSynthesis,
) -> FontId
fn renderer_id( &self, renderer: &ViewRenderer, synthesis: FontSynthesis, ) -> FontId
Gets the instance key in the renderer namespace.
The font configuration must be provided by self, except the synthesis that is used in the font instance.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".