pub enum FontData<'a> {
OpenType(OpenTypeFont<'a>),
Woff(WoffFont<'a>),
Woff2(Woff2Font<'a>),
}Expand description
Type that can represent any of the supported font formats.
Variants§
Implementations§
Source§impl<'a> FontData<'a>
impl<'a> FontData<'a>
Sourcepub fn table_provider(
&self,
index: usize,
) -> Result<DynamicFontTableProvider<'a>, ReadWriteError>
pub fn table_provider( &self, index: usize, ) -> Result<DynamicFontTableProvider<'a>, ReadWriteError>
Obtain an implementation of FontTableProvider for this font.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FontData<'a>
impl<'a> RefUnwindSafe for FontData<'a>
impl<'a> Send for FontData<'a>
impl<'a> Sync for FontData<'a>
impl<'a> Unpin for FontData<'a>
impl<'a> UnwindSafe for FontData<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more