pub fn renderer(&self) -> Result<super::render::Renderer<Font, Fg, Bg, Tgt>> {
        let metrics = self.fonts.load_metrics()?;
        let font_manager =
            super::font::Manager::new(&self.textures, self.fonts, metrics, &self.colours.fg);
        Ok(super::render::Renderer::new(
            self.canvas.borrow_mut(),
            font_manager,
            self.colours,
        ))
    }
/// Spawns a renderer targeting the SDL window.
///
/// # Errors
///
/// Fails if we can't set up the font metrics map.
Spawns a renderer targeting the SDL window.
Spawns a renderer targeting the SDL window .
pub fn renderer(&self) -> Result<super::render::Renderer<Font, Fg, Bg, Tgt>> {
        let metrics = self.fonts.load_metrics()?;
        let font_manager =
            super::font::Manager::new(&self.textures, self.fonts, metrics, &self.colours.fg);
        Ok(super::render::Renderer::new(
            self.canvas.borrow_mut(),
            font_manager,
            self.colours,
        ))
    }
pub fn renderer ( & self ) -> Result < super :: render :: Renderer < Font , Fg , Bg , Tgt > > { let metrics = self . fonts . load_metrics ( ) ? ; let font_manager = super :: font :: Manager :: new ( & self . textures , self . fonts , metrics , & self . colours . fg ) ; Ok ( super :: render :: Renderer :: new ( self . canvas . borrow_mut ( ) , font_manager , self . colours , ) ) }
Spawns a renderer targeting the SDL window.
Spawns a renderer targeting the SDL window .
&self
errors
Fails if we can't set up the font metrics map.
Fails if we can ' t set up the font metrics map .