[][src]Trait crossfont::Rasterize

pub trait Rasterize {
    type Err: Error + Send + Sync + 'static;
    fn new(
        device_pixel_ratio: f32,
        use_thin_strokes: bool
    ) -> Result<Self, Self::Err>
    where
        Self: Sized
;
fn metrics(&self, _: FontKey, _: Size) -> Result<Metrics, Self::Err>;
fn load_font(&mut self, _: &FontDesc, _: Size) -> Result<FontKey, Self::Err>;
fn get_glyph(&mut self, _: GlyphKey) -> Result<RasterizedGlyph, Self::Err>;
fn update_dpr(&mut self, device_pixel_ratio: f32); }

Associated Types

type Err: Error + Send + Sync + 'static

Errors occurring in Rasterize methods.

Loading content...

Required methods

fn new(
    device_pixel_ratio: f32,
    use_thin_strokes: bool
) -> Result<Self, Self::Err> where
    Self: Sized

Create a new Rasterizer.

fn metrics(&self, _: FontKey, _: Size) -> Result<Metrics, Self::Err>

Get Metrics for the given FontKey.

fn load_font(&mut self, _: &FontDesc, _: Size) -> Result<FontKey, Self::Err>

Load the font described by FontDesc and Size.

fn get_glyph(&mut self, _: GlyphKey) -> Result<RasterizedGlyph, Self::Err>

Rasterize the glyph described by GlyphKey..

fn update_dpr(&mut self, device_pixel_ratio: f32)

Update the Rasterizer's DPI factor.

Loading content...

Implementors

impl Rasterize for FreeTypeRasterizer[src]

type Err = Error

Loading content...