[][src]Struct embedded_picofont::FontPico

pub struct FontPico;

The 4x6 pixel monospace font used by the PICO-fantasy 8 console.

Examples

Write some text to the screen at the default (0, 0) position

Text::new("Hello Rust!", Point::new(0, 0))
    .into_styled(TextStyle::new(FontPico, Gray8::WHITE))
    .draw(&mut display);

Translate text by (20px, 30px)

Text::new("Hello Rust!", Point::new(20, 30))
    .into_styled(TextStyle::new(FontPico, Gray8::WHITE))
    .draw(&mut display);

Add some styling to the text

Use the TextStyleBuilder trait to edit the colors of the rendered text:

let style = TextStyleBuilder::new(FontPico)
    .text_color(Rgb888::MAGENTA)
    .background_color(Rgb888::BLACK)
    .build();

Text::new("Hello Rust!", Point::new(0, 0))
    .into_styled(style)
    .draw(&mut display);

Trait Implementations

impl Clone for FontPico[src]

impl Copy for FontPico[src]

impl Debug for FontPico[src]

impl Default for FontPico[src]

impl Eq for FontPico[src]

impl Font for FontPico[src]

impl Hash for FontPico[src]

impl Ord for FontPico[src]

impl PartialEq<FontPico> for FontPico[src]

impl PartialOrd<FontPico> for FontPico[src]

impl StructuralEq for FontPico[src]

impl StructuralPartialEq for FontPico[src]

Auto Trait Implementations

impl Send for FontPico

impl Sync for FontPico

impl Unpin for FontPico

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.