pub struct RendererBuilder<'r, R: Resources, F: Factory<R>> { /* private fields */ }
Expand description

Text renderer builder. Allows to set rendering options using builder pattern.

Examples

ⓘ
let mut text = gfx_text::RendererBuilder::new(factory)
    .with_size(25)
    .with_font("/path/to/font.ttf")
    .with_chars(&['a', 'b', 'c'])
    .build()
    .unwrap();

Implementations

Create a new text renderer builder.

Specify custom size.

Specify custom font by path.

Pass raw font data.

Specify outline width and color. Not implemented yet.

Specify custom initial buffer size.

Make available only provided characters in font texture instead of loading all existing from the font face.

Build a new text renderer instance using current settings.

Just an alias for builder.build().unwrap().

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.