pub trait FontSystem {
// Required methods
fn load_font(&self, query: &FontQuery) -> Result<FontData, FontError>;
fn shape_text(
&self,
request: &ShapeRequest<'_>,
) -> Result<ShapedText, FontError>;
}Expand description
Font loading and shaping boundary used by engine profiles.
Required Methods§
Sourcefn load_font(&self, query: &FontQuery) -> Result<FontData, FontError>
fn load_font(&self, query: &FontQuery) -> Result<FontData, FontError>
Load font data that matches the query.
Sourcefn shape_text(
&self,
request: &ShapeRequest<'_>,
) -> Result<ShapedText, FontError>
fn shape_text( &self, request: &ShapeRequest<'_>, ) -> Result<ShapedText, FontError>
Shape text into positioned glyphs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".