pub struct FontBuf { /* private fields */ }Expand description
Owned version of Font.
Can be loaded as FileBuf from ROM with load_file_buf
and then cast using Into::into.
Trait Implementations§
Source§impl Font for FontBuf
Available on crate feature alloc only.
impl Font for FontBuf
Available on crate feature
alloc only.Source§fn line_width_ascii(&self, t: &str) -> u32
fn line_width_ascii(&self, t: &str) -> u32
Calculate width (in pixels) of the given ASCII text. Read more
Source§fn line_width_utf8(&self, t: &str) -> u32
fn line_width_utf8(&self, t: &str) -> u32
Calculate width (in pixels) of the given UTF-8 text. Read more
Source§fn char_width(&self) -> u8
fn char_width(&self) -> u8
The width (in pixels) of one glyph bounding box.
Source§fn char_height(&self) -> u8
fn char_height(&self) -> u8
The height (in pixels) of one glyph (one line) bounding box.
Auto Trait Implementations§
impl Freeze for FontBuf
impl RefUnwindSafe for FontBuf
impl Send for FontBuf
impl Sync for FontBuf
impl Unpin for FontBuf
impl UnsafeUnpin for FontBuf
impl UnwindSafe for FontBuf
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