pub struct FontReader<T: Read + Seek> { /* private fields */ }Expand description
A struct to help reading fonts from a path
Implementations§
Source§impl FontReader<File>
impl FontReader<File>
Sourcepub fn new(font_path: &Path) -> MulReaderResult<FontReader<File>>
pub fn new(font_path: &Path) -> MulReaderResult<FontReader<File>>
Create a new FontReader from a mul path
Source§impl<T: Read + Seek> FontReader<T>
impl<T: Read + Seek> FontReader<T>
Sourcepub fn from_readable(data_reader: T) -> FontReader<T>
pub fn from_readable(data_reader: T) -> FontReader<T>
Create a FontReader from an existing readable object
Sourcepub fn read_fonts(&mut self) -> MulReaderResult<Vec<Font>>
pub fn read_fonts(&mut self) -> MulReaderResult<Vec<Font>>
Read all 10 fonts from the file. As fonts are variable-length (due to differing character sizes), it’s not easy to read them individually
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FontReader<T>where
T: Freeze,
impl<T> RefUnwindSafe for FontReader<T>where
T: RefUnwindSafe,
impl<T> Send for FontReader<T>where
T: Send,
impl<T> Sync for FontReader<T>where
T: Sync,
impl<T> Unpin for FontReader<T>where
T: Unpin,
impl<T> UnsafeUnpin for FontReader<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FontReader<T>where
T: UnwindSafe,
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