Struct gfx_text::RendererBuilder [] [src]

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

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

Examples

Be careful when using this code, it's not being tested!
let mut text = gfx_text::RendererBuilder::new(factory)
    .with_size(25)
    .with_font("/path/to/font.ttf")
    .with_chars(&['a', 'b', 'c'])
    .build()
    .unwrap();

Methods

impl<'r, R: Resources, F: Factory<R>> RendererBuilder<'r, R, F>
[src]

[src]

Create a new text renderer builder.

[src]

Specify custom size.

[src]

Specify custom font by path.

[src]

Pass raw font data.

[src]

Specify outline width and color. Not implemented yet.

[src]

Specify custom initial buffer size.

[src]

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

[src]

Build a new text renderer instance using current settings.

[src]

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