[−][src]Trait crossfont::Rasterize
Associated Types
Loading content...Required methods
fn new(
device_pixel_ratio: f32,
use_thin_strokes: bool
) -> Result<Self, Self::Err> where
Self: Sized,
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.
Implementors
impl Rasterize for Rasterizer
[src]
type Err = Error
fn new(
device_pixel_ratio: f32,
use_thin_strokes: bool
) -> Result<Rasterizer, Error>
[src]
device_pixel_ratio: f32,
use_thin_strokes: bool
) -> Result<Rasterizer, Error>
fn metrics(&self, key: FontKey, _size: Size) -> Result<Metrics, Error>
[src]
Get metrics for font specified by FontKey.
fn load_font(&mut self, desc: &FontDesc, size: Size) -> Result<FontKey, Error>
[src]
fn get_glyph(&mut self, glyph: GlyphKey) -> Result<RasterizedGlyph, Error>
[src]
Get rasterized glyph for given glyph key.