[−][src]Struct fonterator::Font
A collection of TTF/OTF fonts used as a single font.
Implementations
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)
[src]
&'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
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,
[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,
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, 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.
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>,