pub struct Font {
pub name: &'static str,
pub glyph_size: LcdSize,
pub stride: usize,
pub data: &'static [u8],
}Expand description
Representation of a font.
Fields§
§name: &'static strThe name of the font.
glyph_size: LcdSizeThe size of a single glyph, in pixels.
stride: usizeThe number of bytes in every glyph row.
data: &'static [u8]The bitmap data for the font.
Implementations§
Source§impl Font
impl Font
Sourcepub fn chars_in_area(&self, area: SizeInPixels) -> CharsXY
pub fn chars_in_area(&self, area: SizeInPixels) -> CharsXY
Computes the number of characters that fit within the given pixels area.
Auto Trait Implementations§
impl Freeze for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnsafeUnpin for Font
impl UnwindSafe for Font
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