Struct bracket_terminal::prelude::Font[][src]

pub struct Font {
    pub bitmap_file: String,
    pub width: u32,
    pub height: u32,
    pub gl_id: Option<u32>,
    pub tile_size: (u32, u32),
    pub explicit_background: Option<RGB>,
    pub font_dimensions_glyphs: (u32, u32),
}
Expand description

BTerm’s representation of a font or tileset file.

Fields

bitmap_file: Stringwidth: u32height: u32gl_id: Option<u32>tile_size: (u32, u32)explicit_background: Option<RGB>font_dimensions_glyphs: (u32, u32)

Implementations

Creates an unloaded texture with filename and size parameters provided.

Loads a font file (texture) to obtain the width and height for you

Load a font, and allocate it as an OpenGL resource. Returns the OpenGL binding number (which is also set in the structure).

Sets this font file as the active texture

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.