pub struct Font6x12;
Expand description

6x12 pixel monospace font.

6x12 font spritemap screenshot

§Examples

See the module-level documentation for examples.

Trait Implementations§

source§

impl Clone for Font6x12

source§

fn clone(&self) -> Font6x12

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 Font6x12

source§

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

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

impl Default for Font6x12

source§

fn default() -> Font6x12

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

impl Font for Font6x12

source§

const FONT_IMAGE: &'static [u8] = b"\x00\x05\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00E\x14 \x02\x08\t\x00\x00\x00\x00\x02\x00@\x14s%\x00\x10\x80\x00\x00\x00\x02\x00@>\xab%\x00 DD\x00\x00\x04\x00@\x14\xa0B\x00 B\x84\x00\x00\x04\x00@\x14p\x82\x80 G\xdf\x01\xe0\x08\x00@\x14(\x85\x80 B\x84\x00\x00\x08\x00\x00>)\x04\x80 DD\x00\x00\x10\x00\x00\x14\xaad\x80\x10\x80\x00 \x00\x10\x00@\x14rc\xc0\t\x00\x00 \x02\x10\x00\x00\x00 \x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000C\x0c\t\xe3\x1e0\xc0\x00\x00\x00\x0cH\xc4\x92\x19\x04\x12I \x00\x10\x08\x12ID\x82)\x04\x02I \x00 \x04\x12X@\x82I\xc7\x04I\"\x08A\xe2\x02h@\x8cH$\x841 \x00\x80\x01\x04HA\x02H$\x84H\xe0\x00@\x02\x08HB\x02x$\x88H \x00!\xe4\x08HD\x12\t$\x88HB\x08\x10\x08\x001\xe7\x8c\x08\xc3\x081\x80\x08\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\xc7\x0ca\xe7\x8cH\xe1\x92B$\x8cI$\x92Q\x04\x12H@\x92Cd\x92Y$\x90I\x04\x10H@\x94Cf\x92i$\x90I\x04\x10H@\x98B\xa6\x92i\xe7\x10I\xc7\x16x@\x90B\xa5\x92i$\x90I\x04\x12H@\x98B%\x92Y$\x90I\x04\x12HD\x94B$\x92A$\x92Q\x04\x12HD\x92B$\x929\'\x0ca\xe4\x0cH\xe3\x12z$\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00p\xc7\x0c}(\xa2\x8a\'\x8cA\x85\x00I$\x92\x11(\xa2\x8a \x88@\x88\x80I$\x90\x11(\xa2QA\x08 \x80\x00I$\x90\x11(\xa2QA\x08 \x80\x00q\'\x0c\x11%* \x82\x08\x10\x80\x00A$\x02\x11%*P\x82\x08\x10\x80\x00A&\x02\x11%6P\x84\x08\x08\x80\x00A%\x12\x11\"6\x88\x84\x08\x08\x80\x00@\xc4\x8c\x10\xc2\"\x88\x87\x8c\t\x80\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x04\x00\x08\x01\x80@A\x100\x00\x00\x00\x04\x00\x08\x02\x00@\x00\x10\x10\x00\x00\x00\x04\x00\x08\x02\x00@\x00\x10\x10\x00\x00\x00\xc7\x0c8\xc7\x0ep\xc1\x14\x13\xc7\x0c\x00$\x92I\"\x12HA\x18\x12\xa4\x92\x00\xe4\x90I\"\x12HA\x10\x12\xa4\x92\x01$\x90I\xe2\x12HA\x18\x12\xa4\x92\x01$\x92I\x02\x12HA\x14\x12\xa4\x92\x00\xe7\x0c8\xc2\x0eH\xe1\x12:\xa4\x8c\x00\x00\x00\x00\x00\x02\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x80\x00\x00\x00\x00\x00\x00\x00\x00\x06\x11\x87\x80\x00\x00\x00 \x00\x00\x00\x00\x08\x10E\x00\x00\x00\x00 \x00\x00\x00\x00\x08\x10@\x00p\xe5\x0cy(\xa2\x89\'\x88\x10@\x00I&\x10!(\xa2Q \x90\x10 \x00I$\x0c!%*!!\x08\x10@\x00I$\x02!%*Q\"\x08\x10@\x00I$\x12!\"*\x89$\x08\x10@\x00p\xe4\x0c\x18\xe2\x14\x88\xe7\x86\x11\x80\x00@ \x00\x00\x00\x00\x00 \x00\x00\x00\x00@ \x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00"

Raw image data containing the font.
source§

const FONT_IMAGE_WIDTH: u32 = 96u32

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 Font6x12

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 Font6x12

source§

fn cmp(&self, other: &Font6x12) -> 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 + PartialOrd,

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

impl PartialEq for Font6x12

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Font6x12

source§

fn partial_cmp(&self, other: &Font6x12) -> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Font6x12

source§

impl Eq for Font6x12

source§

impl StructuralPartialEq for Font6x12

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> 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>,

§

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>,

§

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.