embedded_graphics::fonts

Struct Font6x8

Source
pub struct Font6x8;
Expand description

6x8 pixel monospace font.

6x8 font spritemap screenshot

§Examples

See the module-level documentation for examples.

Trait Implementations§

Source§

impl Clone for Font6x8

Source§

fn clone(&self) -> Font6x8

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Font6x8

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Font6x8

Source§

fn default() -> Font6x8

Returns the “default value” for a type. Read more
Source§

impl Font for Font6x8

Source§

const FONT_IMAGE: &'static [u8] = b"\x00\x84\x94#\x06\x18\x11\x00\x00\x00\x00\x00p\x87\x1c\x13\xe3>q\xc0\x00\x10\x08\x1cq\xcf\x1c\xe3\xef\x9c\x00\x84\x94{)\x08 \x85\x08\x00\x00\x02\x89\x88\xa22\x04\x02\x8a&\x00 \x04\"\x8a(\xa2\x92\x08\"\x00\x84\xbe\xa0J\x10@B\x08\x00\x00\x04\x98\x80\x82S\xc8\x04\x8a&\x18C\xe2\x02\n(\xa0\x8a\x08 \x00\x80\x14p\x84\x00@O\xbe\x03\xe0\x08\xa8\x83\x0c\x90/\x08q\xe0\x18\x80\x01\x04k\xef \x8b\xcf \x00\x80>)\n\x80@B\x08\x00\x00\x10\xc8\x84\x02\xf8(\x90\x88&\x00C\xe2\x08\xaa(\xa0\x8a\x08&\x00\x00\x14\xf2i\x00 \x85\x08`\x06 \x88\x88\"\x12(\x90\x88F\x18 \x04\x00\xaa(\xa2\x92\x08\"\x00\x80\x14 f\x80\x11\x00\x00 \x06\x00q\xcf\x9c\x11\xc7\x10q\x80\x08\x10\x08\x08r/\x1c\xe3\xe8\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xc3\xa2\x82(\x9c\xf1\xcf\x1c\xfa(\xa2\x8a/\x9c\x01\xc2\x00@\x08\x00\x08\x03\x00\x80\x81 `\x00\x00\x88\x81$\x83h\xa2\x8a(\xa2\"(\xa2\x8a \x90\x80E\x00 \x08\x00\x08\x04\x80\x80\x00 \x00\x00\x88\x81(\x82\xac\xa2\x8a(\xa0\"(\xa2R!\x10@H\x80\x11\xcb\x1ci\xc4\x1e\xb1\x83$#K\x1c\xf8\x810\x82\xaa\xa2\xf2/\x1c\"(\xaa!B\x10 @\x00\x00,\xa0\x9a.\"\xc8\x81(\"\xac\xa2\x88\x81(\x82)\xa2\x82\xaa\x02\"(\xaaP\x84\x10\x10@\x00\x01\xe8\xa0\x8b\xe4\"\x88\x810\"(\xa2\x88\x89$\x82(\xa2\x82I\"\"%*\x88\x88\x10\x08@\x00\x02(\xa2\x8a\x04\x1e\x88\x81(\"(\xa2\x89\xc6\"\xfa(\x9c\x81\xa8\x9c!\xc2\x14\x88\x8f\x9c\x01\xc0\x00\x01\xef\x1cy\xc4\x02\x89\xc9$r(\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>\x00\x00\x00\x00\x00\x1c\x00\x06\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x04!\x06\x88\x00\xc0\" \xc8\xbep\x00\x00\xfb\xe2\x00c\x81\x80x\x00\x10\x00\x00\x00@\x00\x00\x00\x00\x08 \x89\x00!\x00\x14! \"\x08\xa0\x00\x88\x05\x08\x90B\x00\x98\x000\xf1\xeb\x1e\xe2(\xa2\x8a/\x88 \x80\x08q\x08\xbe \x80*y@\x00\xa8\x02\x1c!\x80\"\x98\x00\x10\x8a,\xa0B(\xa2R!\x10 @\x08\xa3\x87\x08\x01@.\x8a\x8f\x9c\x88\x00\x08@@\"x\xc0\x10\x8a(\x1cB(\xaa\"\"\x08 \x80\x08\xa1\x05> \x80*q@\x80\x98\x00\x00\xf3\x80\"\x18\xc08\xf1\xe8\x02Je*Q\xe4\x08 \x80\x08\xa9\'\x08\"@\"\x00\xa0\x80\xa8\x00\x1c\x00\x002\x18\x00\x00\x80(<1\xa2\x14\x88/\x84!\x00\x08r\xc8\x88!\x80>\x00\x00\x00\xf8\x00\x00\x00\x00,\x18\x00\x00\x80 \x00\x00\x00\x00\x01\xc0\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x02\x00p\x08\xa2\xc0\x8c\x06!\xa5\x089\xcc\x06!L\x06!G\x1a\xc0b\x1aP\x070\x18\x85&\xe0\x0c\x06\x8a\x89$@\x02\x08R@\x00b\"\x08P\x02\x08P\x04\xa4 \x85$\x02(\x88!@*A\x82\x08\x89J(\xc0\x87\x1cq\xc7\x1c\xa2\x0f\xbe\xfb\xe7\x1cq\xc4\xa2q\xc7\x1cqI\xa2\x8a(\xa2rG\x1c\x88\xa5\x10I\x08\xa2\x8a(\xa2\xba\x08 \x82\x02\x08 \x8e\xb2\x8a(\xa2\x88\x8a\xa2\x8a(\x94K\xc0\x82qK.\xda\x0f\xbe\xfb\xef\xbe\xe2\x0e8\xe3\x82\x08 \x84\xaa\x8a(\xa2\x89L\xa2\x8a(\x88J\'\x9e\x02\x85\x02*(\xa2\x8a(\xa2\xa2( \x82\x02\x08 \x84\xa6\x8a(\xa2\x8a(\xa2\x8a(\x88r(\xa2\x00\x07\x849\xc8\xa2\x8a(\xa2\xb9\xcf\xbe\xfb\xe7\x1cq\xc7\"q\xc7\x1cp\x07\x1cq\xc7\x08B\xc7\x9e\x00\x01\x0e\x08\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x00\x00q\xa5\x08\x00\x0c\x06qL\x06qJ\x1a\xc0g\x1aP\x00\x06\xc1\xc5\x06a@\x00\x00\x00\x00\x00\x00\x00\x8a@\x00\x00\x02\x08\x88\x02\x08\x88\x04$ \x88\xa4\x00\x80\x08\" \x08 \x00\x00\x00\x00\x00\x00\x00\x00q\xc7\x1c\xd1\xc7\x1cq\xc0\x00\x00\n,q\xc7\x1cp\x07\"\x8a(\xa22 \x00\x00\x00\x00\x00\x00\x00\x08 \x82*\x08\xa2\x8a&\x18a\x812\x8a(\xa2\x8b\xe9\xa2\x8a(\xa2* \x00\x00\x00\x00\x00\x00\x00y\xe7\x9ez\x0f\xbe\xfb\xe2\x08 \x87\xa2\x8a(\xa2\x88\n\xa2\x8a(\xa22 \x00\x00\x00\x00\x00\x00\x00\x8a(\xa2\xa2( \x82\x02\x08 \x88\xa2\x8a(\xa2\x88\x8c\xa6\x9ai\x9e!\xe0\x00\x00\x00\x00\x00\x00\x00y\xe7\x9eY\xc7\x1cq\xc7\x1cq\xc7\"q\xc7\x1cp\x07\x1ai\xa6\x82p \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x01\xc0\x00\x00\x00\x00\x00\x00\x00"

Raw image data containing the font.
Source§

const FONT_IMAGE_WIDTH: u32 = 240u32

The width of the raw image data. Read more
Source§

const CHARACTER_SIZE: Size

Size of a single character in pixel.
Source§

fn char_offset(c: char) -> u32

Returns the position a character in the font.
Source§

const CHARACTER_SPACING: u32 = 0u32

Spacing between characters. Read more
Source§

const VARIABLE_WIDTH: bool = false

Whether characters have a variable width or not. Read more
Source§

fn char_width(c: char) -> u32

Returns the actual width of a character in the font.
Source§

fn character_pixel(c: char, x: u32, y: u32) -> bool

Returns the value of a pixel in a character in the font.
Source§

impl Hash for Font6x8

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Font6x8

Source§

fn cmp(&self, other: &Font6x8) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Font6x8

Source§

fn eq(&self, other: &Font6x8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Font6x8

Source§

fn partial_cmp(&self, other: &Font6x8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Font6x8

Source§

impl Eq for Font6x8

Source§

impl StructuralPartialEq for Font6x8

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes