pub struct OpenTypeReader<'a> { /* private fields */ }Expand description
Reader for OpenType files (.otf / .ttf). Borrows data from an external source.
Implementations§
Source§impl<'a> OpenTypeReader<'a>
impl<'a> OpenTypeReader<'a>
Sourcepub fn new(bytes: &'a [u8]) -> Result<Self, ParseError>
pub fn new(bytes: &'a [u8]) -> Result<Self, ParseError>
Creates a reader from the specified raw bytes.
This will parse the OpenType header and table records.
§Errors
Returns parsing errors if any are encountered.
Sourcepub fn raw_tables(
&self,
) -> impl ExactSizeIterator<Item = (TableTag, &'a [u8])> + '_
pub fn raw_tables( &self, ) -> impl ExactSizeIterator<Item = (TableTag, &'a [u8])> + '_
Iterates over all tables in the file (including ones that are not processed by Font).
Trait Implementations§
Source§impl<'a> Clone for OpenTypeReader<'a>
impl<'a> Clone for OpenTypeReader<'a>
Source§fn clone(&self) -> OpenTypeReader<'a>
fn clone(&self) -> OpenTypeReader<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for OpenTypeReader<'a>
impl<'a> RefUnwindSafe for OpenTypeReader<'a>
impl<'a> Send for OpenTypeReader<'a>
impl<'a> Sync for OpenTypeReader<'a>
impl<'a> Unpin for OpenTypeReader<'a>
impl<'a> UnwindSafe for OpenTypeReader<'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