Skip to main content

FontSystem

Trait FontSystem 

Source
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§

Source

fn load_font(&self, query: &FontQuery) -> Result<FontData, FontError>

Load font data that matches the query.

Source

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".

Implementations on Foreign Types§

Source§

impl<T> FontSystem for &T
where T: FontSystem,

Implementors§