[][src]Struct blend2d::font::FontLoader

#[repr(transparent)]
pub struct FontLoader { /* fields omitted */ }

Font Loader

Methods

impl FontLoader[src]

pub fn from_path<P: AsRef<Path>>(
    path: P,
    read_flags: DataAccessFlags
) -> Result<Self>
[src]

Creates a new font by reading a file at the given path.

pub fn from_data_array(data: &Array<u8>) -> Result<Self>[src]

Creates a new font from the given Array.

pub fn create_font_face(&self, index: u32) -> Result<FontFace>[src]

pub fn data_by_face_index(&mut self, idx: u32) -> FontData[src]

pub fn face_type(&self) -> FontFaceType[src]

Type of font-face of the loader content.

It doesn't matter if the content is a single font or a collection. In any case face_type would always return the type of the font-face that will be created by FontFace::from_loader.

pub fn face_count(&self) -> u32[src]

Returns the number of faces this loader provides.

If the loader is initialized to a single font it would be 1, and if the loader is initialized to a font collection then the return would correspond to the number of font-faces within that collection.

pub fn loader_flags(&self) -> FontLoaderFlags[src]

Returns the FontLoaderFlags.

Trait Implementations

impl Drop for FontLoader[src]

impl PartialEq<FontLoader> for FontLoader[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Clone for FontLoader[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for FontLoader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ArrayType for T where
    T: WrappedBlCore, 
[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.

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

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

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