Struct sensehat_screen::FontCollection
[−]
[src]
pub struct FontCollection(_);
A set of font symbols that can be printed on a Screen.
Methods
impl FontCollection[src]
pub fn new() -> Self[src]
Create a default FontCollection, containing the Unicode constants
from the font8x8 crate, except for
MISC_UNICODE, and SGA_UNICODE (which are non-standard).
pub fn from_hashmap(hashmap: HashMap<u16, [u8; 8]>) -> Self[src]
Create a FontCollection with a custom HashMap of font symbols.
pub fn get(&self, symbol: u16) -> Option<&[u8; 8]>[src]
Get an Option with the symbol's byte rendering.
pub fn contains_key(&self, symbol: u16) -> bool[src]
Search if collection has a symbol by its unicode key.
pub fn sanitize_str(&self, s: &str) -> Result<FontString, FromUtf16Error>[src]
Sanitize a &str and create a new FontString.
Trait Implementations
impl Clone for FontCollection[src]
fn clone(&self) -> FontCollection[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for FontCollection[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for FontCollection[src]
fn eq(&self, __arg_0: &FontCollection) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &FontCollection) -> bool[src]
This method tests for !=.