[−][src]Struct glyph_brush::GlyphCalculatorBuilder
Builder for a GlyphCalculator
.
Example
use glyph_brush::{ab_glyph::FontArc, GlyphCalculator, GlyphCalculatorBuilder}; let dejavu = FontArc::try_from_slice(include_bytes!("../../fonts/DejaVuSans.ttf")).unwrap(); let mut glyphs: GlyphCalculator = GlyphCalculatorBuilder::using_font(dejavu).build();
Implementations
impl<F: Font> GlyphCalculatorBuilder<F>
[src]
pub fn using_font(font: F) -> Self
[src]
Specifies the default font used to render glyphs.
Referenced with FontId(0)
, which is default.
pub fn using_fonts(fonts: Vec<F>) -> Self
[src]
impl<F: Font, H: BuildHasher> GlyphCalculatorBuilder<F, H>
[src]
pub fn add_font<I: Into<F>>(&mut self, font_data: I) -> FontId
[src]
Adds additional fonts to the one added in using_font
.
Returns a FontId
to reference this font.
pub fn section_hasher<T: BuildHasher>(
self,
section_hasher: T
) -> GlyphCalculatorBuilder<F, T>
[src]
self,
section_hasher: T
) -> GlyphCalculatorBuilder<F, T>
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 xxHash.
pub fn build<X>(self) -> GlyphCalculator<F, X, H>
[src]
Builds a GlyphCalculator
Trait Implementations
impl<F: Clone, H: Clone> Clone for GlyphCalculatorBuilder<F, H>
[src]
pub fn clone(&self) -> GlyphCalculatorBuilder<F, H>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: Debug, H: Debug> Debug for GlyphCalculatorBuilder<F, H>
[src]
Auto Trait Implementations
impl<F, H> RefUnwindSafe for GlyphCalculatorBuilder<F, H> where
F: RefUnwindSafe,
H: RefUnwindSafe,
[src]
F: RefUnwindSafe,
H: RefUnwindSafe,
impl<F, H> Send for GlyphCalculatorBuilder<F, H> where
F: Send,
H: Send,
[src]
F: Send,
H: Send,
impl<F, H> Sync for GlyphCalculatorBuilder<F, H> where
F: Sync,
H: Sync,
[src]
F: Sync,
H: Sync,
impl<F, H> Unpin for GlyphCalculatorBuilder<F, H> where
F: Unpin,
H: Unpin,
[src]
F: Unpin,
H: Unpin,
impl<F, H> UnwindSafe for GlyphCalculatorBuilder<F, H> where
F: UnwindSafe,
H: UnwindSafe,
[src]
F: UnwindSafe,
H: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,