pub trait RenderExt {
    // Required methods
    fn render(&self, text: &str, mode: RenderMode) -> Result<TtfSurface>;
    fn render_wrapped(
        &self,
        text: &str,
        wrap_length: u32,
        mode: RenderMode
    ) -> Result<TtfSurface>;
    fn render_glyph(&self, ch: char, mode: RenderMode) -> Result<TtfSurface>;
}
Expand description

An extension for rendering the text.

Required Methods§

source

fn render(&self, text: &str, mode: RenderMode) -> Result<TtfSurface>

Renders the text into the TtfSurface, or Err on failure.

source

fn render_wrapped( &self, text: &str, wrap_length: u32, mode: RenderMode ) -> Result<TtfSurface>

Renders the wrapped text into the TtfSurface, or Err on failure.

source

fn render_glyph(&self, ch: char, mode: RenderMode) -> Result<TtfSurface>

Renders the character into the TtfSurface, or Err on failure.

Implementors§

source§

impl RenderExt for Font<'_>