From 967c67f9a6a901cacc168edb1e2923ecb8a69be0 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 18 Oct 2018 22:21:44 +0200 Subject: [PATCH] position font elsewhere --- examples/embedded_linux_epd4in2/src/main.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/embedded_linux_epd4in2/src/main.rs b/examples/embedded_linux_epd4in2/src/main.rs index 6ce118e..8638386 100644 --- a/examples/embedded_linux_epd4in2/src/main.rs +++ b/examples/embedded_linux_epd4in2/src/main.rs @@ -302,13 +302,25 @@ fn run() -> Result<(), std::io::Error> { display.draw( Font6x8::render_str("It's working-BoW!") + // Using Style here + .with_style(Style { + fill_color: Some(Color::Black), + stroke_color: Some(Color::Black), + stroke_width: 0u8, // Has no effect on fonts + }) + .translate(Coord::new(50, 200)) + .into_iter(), + ); + + display.draw( + Font12x16::render_str("It's working-BoW!") // Using Style here .with_style(Style { fill_color: Some(Color::White), stroke_color: Some(Color::Black), stroke_width: 0u8, // Has no effect on fonts }) - .translate(Coord::new(50, 50)) + .translate(Coord::new(50, 22)) .into_iter(), );