[][src]Struct fonterator::Font

pub struct Font<'a> { /* fields omitted */ }

A collection of TTF/OTF fonts used as a single font.


impl<'a> Font<'a>[src]

pub fn new() -> Self[src]

Create a new Font. Add glyphs with add().

pub fn push<B: Into<&'a [u8]>>(self, none: B) -> Option<Self>[src]

Add a TTF or OTF font's glyphs to this Font.

pub fn render(
    &'a self,
    text: &'a str,
    row: f32,
    text_align: TextAlign
) -> (TextPathIterator<'a>, usize)

Render some text. Returns an iterator and how many characters were rendered inside the bounding box.

  • text: text to render.
  • row: x (Left/Right align) or y (Up/Down align) offset where to stop rendering.
  • wh: the size of each character in X & Y dimensions.
  • text_align: how the text is aligned

Trait Implementations

impl<'a> Debug for Font<'a>[src]

impl<'a> Default for Font<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Font<'a>

impl<'a> Send for Font<'a>

impl<'a> Sync for Font<'a>

impl<'a> Unpin for Font<'a>

impl<'a> UnwindSafe for Font<'a>

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.