pub struct GlyphCalculatorBuilder<'a, H = DefaultSectionHasher> { /* private fields */ }
Expand description

Builder for a GlyphCalculator.

Example

extern crate glyph_brush;
use glyph_brush::GlyphCalculatorBuilder;

let dejavu: &[u8] = include_bytes!("../../fonts/DejaVuSans.ttf");
let mut glyphs = GlyphCalculatorBuilder::using_font_bytes(dejavu).build();

Implementations

Specifies the default font data used to render glyphs. Referenced with FontId(0), which is default.

Specifies the default font used to render glyphs. Referenced with FontId(0), which is default.

Adds additional fonts to the one added in using_font / using_font_bytes.

Returns a FontId to reference this font.

Adds additional fonts to the one added in using_font / using_font_bytes.

Returns a FontId to reference this font.

Sets the section hasher. GlyphCalculator cannot handle absolute section hash collisions so use a good hash algorithm.

This hasher is used to distinguish sections, rather than for hashmap internal use.

Defaults to seahash.

Builds a GlyphCalculator

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.