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
OpenType(OpenTypeFont<'a>)
Woff(WoffFont<'a>)
Woff2(Woff2Font<'a>)
Implementations
sourceimpl<'a> FontData<'a>
impl<'a> FontData<'a>
sourcepub fn table_provider(
&'a self,
index: usize
) -> Result<DynamicFontTableProvider<'a>, ReadWriteError>
pub fn table_provider(
&'a self,
index: usize
) -> Result<DynamicFontTableProvider<'a>, ReadWriteError>
Obtain an implementation of FontTableProvider
for this font.
Trait Implementations
sourceimpl<'a> ReadBinary<'a> for FontData<'a>
impl<'a> ReadBinary<'a> for FontData<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more