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.