[−][src]Trait embedded_layout::prelude::Font
Monospaced bitmap font.
Associated Constants
const FONT_IMAGE: &'static [u8]
Raw image data containing the font.
const FONT_IMAGE_WIDTH: u32
The width of the raw image data.
The width must be divisible by 8
and CHARACTER_SIZE.width
.
const CHARACTER_SIZE: Size
Size of a single character in pixel.
const CHARACTER_SPACING: u32
Spacing between characters.
The spacing defines how many empty pixels are added horizontally between adjacent characters on a single line of text.
const VARIABLE_WIDTH: bool
Whether characters have a variable width or not.
Variable width characters have a maximum width of CHARACTER_SIZE.x, but the empty columns at the right of each characters are ignored, allowing some characters to be smaller than others.
Required methods
fn char_offset(char) -> u32
Returns the position a character in the font.
Provided methods
fn char_width(c: char) -> u32
Returns the actual width of a character in the font.
fn character_pixel(c: char, x: u32, y: u32) -> bool
Returns the value of a pixel in a character in the font.
Implementations on Foreign Types
impl Font for Font6x6
[src]
const FONT_IMAGE: &'static [u8]
[src]
const FONT_IMAGE_WIDTH: u32
[src]
const CHARACTER_SIZE: Size
[src]
const VARIABLE_WIDTH: bool
[src]
const CHARACTER_SPACING: u32
[src]
fn char_offset(c: char) -> u32
[src]
impl Font for Font8x16
[src]
const FONT_IMAGE: &'static [u8]
[src]
const FONT_IMAGE_WIDTH: u32
[src]
const CHARACTER_SIZE: Size
[src]
fn char_offset(c: char) -> u32
[src]
impl Font for Font6x12
[src]
const FONT_IMAGE: &'static [u8]
[src]
const FONT_IMAGE_WIDTH: u32
[src]
const CHARACTER_SIZE: Size
[src]
fn char_offset(c: char) -> u32
[src]
impl Font for Font24x32
[src]
const FONT_IMAGE: &'static [u8]
[src]
const FONT_IMAGE_WIDTH: u32
[src]
const CHARACTER_SIZE: Size
[src]
fn char_offset(c: char) -> u32
[src]
impl Font for Font6x8
[src]
const FONT_IMAGE: &'static [u8]
[src]
const FONT_IMAGE_WIDTH: u32
[src]
const CHARACTER_SIZE: Size
[src]
fn char_offset(c: char) -> u32
[src]
impl Font for Font12x16
[src]
Config for 12x16 font