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
.