[][src]Struct gfx_text::RendererBuilder

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

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

Examples

This example is not 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]

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

impl<'r, R, F> Send for RendererBuilder<'r, R, F> where
    F: Send,
    R: Send

impl<'r, R, F> Sync for RendererBuilder<'r, R, F> where
    F: Sync,
    R: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more