Trait conrod::CharacterCache [−] [src]

pub trait CharacterCache {
    type Texture: ImageSize;
    fn character(&mut self, font_size: u32, ch: char) -> &Character<Self::Texture>;

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

Stores characters in a buffer and loads them by demand.

Associated Types

type Texture: ImageSize

The textyre type associated with the character cache.

Required Methods

fn character(&mut self, font_size: u32, ch: char) -> &Character<Self::Texture>

Get reference to character.

Provided Methods

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

Return the width for some given text.

Implementors