Struct glium_graphics::GlyphCache [] [src]

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

Caches characters for a font.

Methods

impl<F> GlyphCache<F>
[src]

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

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, font_size: FontSize, character: char) -> &'a Character<Texture>

Get reference to character.

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

Return the width for some given text.