[][src]Struct mergui::MFont

pub struct MFont { /* fields omitted */ }

Implementations

impl MFont[src]

pub async fn load_ttf<'_>(
    gfx: &'_ Graphics,
    path: &'static str,
    size: f32
) -> Result<MFont>
[src]

pub fn from_font(
    font: &VectorFont,
    gfx: &Graphics,
    font_size: f32
) -> Result<MFont>
[src]

pub fn layout_glyphs(
    &self,
    gfx: &mut Graphics,
    text: &str,
    max_width: Option<f32>,
    callback: impl FnMut(&mut Graphics, LayoutGlyph)
) -> Result<Vector>
[src]

pub fn draw(
    &self,
    gfx: &mut Graphics,
    text: &str,
    color: Color,
    offset: Vector
) -> Result<Vector>
[src]

Trait Implementations

impl Clone for MFont[src]

Auto Trait Implementations

impl !RefUnwindSafe for MFont

impl !Send for MFont

impl !Sync for MFont

impl Unpin for MFont

impl !UnwindSafe for MFont

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.