Struct gfx_glyph::GlyphCalculatorBuilder
[−]
[src]
pub struct GlyphCalculatorBuilder<'a> { /* fields omitted */ }
Builder for a GlyphCalculator
.
Example
extern crate gfx_glyph; use gfx_glyph::GlyphCalculatorBuilder; let dejavu: &[u8] = include_bytes!("../examples/DejaVuSans.ttf"); let mut glyphs = GlyphCalculatorBuilder::using_font_bytes(dejavu).build();
Methods
impl<'a> GlyphCalculatorBuilder<'a>
[src]
fn using_font_bytes<B: Into<SharedBytes<'a>>>(font_0_data: B) -> Self
[src]
Specifies the default font data used to render glyphs.
Referenced with FontId(0)
, which is default.
fn using_fonts_bytes<B, V>(font_data: V) -> Self where
B: Into<SharedBytes<'a>>,
V: Into<Vec<B>>,
[src]
B: Into<SharedBytes<'a>>,
V: Into<Vec<B>>,
fn using_font(font_0_data: Font<'a>) -> Self
[src]
Specifies the default font used to render glyphs.
Referenced with FontId(0)
, which is default.
fn using_fonts<V: Into<Vec<Font<'a>>>>(fonts: V) -> Self
[src]
fn add_font_bytes<B: Into<SharedBytes<'a>>>(&mut self, font_data: B) -> FontId
[src]
Adds additional fonts to the one added in using_font
/
using_font_bytes
.
Returns a FontId
to reference this font.
fn add_font(&mut self, font_data: Font<'a>) -> FontId
[src]
Adds additional fonts to the one added in using_font
/
using_font_bytes
.
Returns a FontId
to reference this font.
fn build(self) -> GlyphCalculator<'a>
[src]
Builds a GlyphCalculator