[−][src]Struct blend2d::font::FontLoader
Font Loader
Methods
impl FontLoader
[src]
pub fn from_path<P: AsRef<Path>>(
path: P,
read_flags: DataAccessFlags
) -> Result<Self>
[src]
path: P,
read_flags: DataAccessFlags
) -> Result<Self>
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]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for FontLoader
[src]
fn clone(&self) -> Self
[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
impl !Send for FontLoader
impl Unpin for FontLoader
impl !Sync for FontLoader
impl RefUnwindSafe for FontLoader
impl UnwindSafe for FontLoader
Blanket Implementations
impl<T> ArrayType for T where
T: WrappedBlCore,
[src]
T: WrappedBlCore,
const IMPL_IDX: usize
[src]
unsafe fn push(&mut BLArrayCore, T)
[src]
unsafe fn insert(&mut BLArrayCore, usize, T)
[src]
unsafe fn replace(&mut BLArrayCore, usize, 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,