fn maybe_get_glyph(
        &self,
        glyph: GlyphKey,
        font: &Font,
    ) -> Option<Result<RasterizedGlyph, Error>> {
        let scaled_size = self.device_pixel_ratio * glyph.size.as_f32_pts();
        font.get_glyph(glyph.c, f64::from(scaled_size), self.use_thin_strokes)
            .map(|r| Some(Ok(r)))
            .unwrap_or_else(|e| match e {
                Error::MissingGlyph(_) => None,
                _ => Some(Err(e)),
            })
    }
// Helper to try and get a glyph for a given font. Used for font fallback.
Helper to try and get a glyph for a given font. Used for font fallback.
Helper to try and get a glyph for a given font . Used for font fallback .
fn maybe_get_glyph(
        &self,
        glyph: GlyphKey,
        font: &Font,
    ) -> Option<Result<RasterizedGlyph, Error>> {
        let scaled_size = self.device_pixel_ratio * glyph.size.as_f32_pts();
        font.get_glyph(glyph.c, f64::from(scaled_size), self.use_thin_strokes)
            .map(|r| Some(Ok(r)))
            .unwrap_or_else(|e| match e {
                Error::MissingGlyph(_) => None,
                _ => Some(Err(e)),
            })
    }
fn maybe_get_glyph ( & self , glyph : GlyphKey , font : & Font , ) -> Option < Result < RasterizedGlyph , Error > > { let scaled_size = self . device_pixel_ratio * glyph . size . as_f32_pts ( ) ; font . get_glyph ( glyph . c , f64 :: from ( scaled_size ) , self . use_thin_strokes ) . map ( | r | Some ( Ok ( r ) ) ) . unwrap_or_else ( | e | match e { Error :: MissingGlyph ( _ ) => None , _ => Some ( Err ( e ) ) , } ) }
Helper to try and get a glyph for a given font.
Helper to try and get a glyph for a given font .
&self
glyph
GlyphKey
font
&Font