Enum ggez::graphics::Font [] [src]

pub enum Font {
    TTFFont {
        font: Font,
    },
    BitmapFont {
        surface: Surface<'static>,
        glyphs: BTreeMap<charu32>,
        glyph_width: u32,
    },
}

A font that defines the shape of characters drawn on the screen. Can be created from a .ttf file or from an image.

Variants

Fields

Fields

Methods

impl Font
[src]

Load a new TTF font from the given file.

Create a new bitmap font from a loaded Image The Image is a 1D list of glyphs, which maybe isn't super ideal but should be fine. The glyphs string is the characters in the image from left to right. Takes ownership of the Image in question.