pub struct Font { /* private fields */ }Implementations§
Source§impl Font
impl Font
Sourcepub fn get_height(&self) -> u8
pub fn get_height(&self) -> u8
Returns the height of the given font.
Sourcepub fn get_text_width(&self, text: impl AsRef<str>, tracking: i32) -> u32
pub fn get_text_width(&self, text: impl AsRef<str>, tracking: i32) -> u32
Returns the width of the given text in the given font.
Sourcepub fn get_page(&self, c: u32) -> FontPage
pub fn get_page(&self, c: u32) -> FontPage
Returns an LCDFontPage object for the given character code. Each LCDFontPage contains information for 256 characters; specifically, if (c1 & ~0xff) == (c2 & ~0xff), then c1 and c2 belong to the same page and the same LCDFontPage can be used to fetch the character data for both instead of searching for the page twice.
Trait Implementations§
impl Eq for Font
impl Send for Font
impl StructuralPartialEq for Font
impl Sync for Font
Auto Trait Implementations§
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