[][src]Struct quicksilver::graphics::VectorFont

pub struct VectorFont(_);

VectorFonts allow drawing characters from TTF files

They store the glyphs as a collection of triangles, allowing them to be scaled up or down without losing quality. To draw characters to the screen, use the to_renderer method to create a FontRenderer.

Implementations

impl VectorFont[src]

pub fn from_slice(data: &[u8]) -> Self[src]

Create a VectorFont from a slice of binary TTF data

pub fn from_bytes(data: Vec<u8>) -> Self[src]

Create a VectorFont from an owned Vec of TTF data

pub async fn load(path: impl AsRef<Path>) -> Result<Self>[src]

Load a VectorFont from a TTF file at the given path

pub fn to_renderer(
    &self,
    gfx: &Graphics,
    font_size: f32
) -> Result<FontRenderer>
[src]

Convert a VectorFont to a FontRenderer for actual use

Auto Trait Implementations

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, 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.