Struct glium_graphics::GlyphCache [] [src]

pub struct GlyphCache<F> {
    // some fields omitted
}

Caches characters for a font.

Methods

impl<F> GlyphCache<F> where F: Facade
[src]

fn new<P>(font: P, facade: F) -> Result<Self, Error> where P: AsRef<Path>

Constructor for a GlyphCache.

Trait Implementations

impl<F: Facade> CharacterCache for GlyphCache<F>
[src]

type Texture = Texture

The textyre type associated with the character cache.

fn character<'a>(&'a mut self, size: FontSize, ch: char) -> Character<'a, Texture>

Get reference to character.

fn width(&mut self, size: u32, text: &str) -> f64

Return the width for some given text.