From f2d745846348e42343b67188b4266e9baa8e0113 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 29 Jan 2024 03:33:41 +0800 Subject: [PATCH] test code for fonts --- services/cram-console/src/main.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/services/cram-console/src/main.rs b/services/cram-console/src/main.rs index f2e22f150..ffd25fb61 100644 --- a/services/cram-console/src/main.rs +++ b/services/cram-console/src/main.rs @@ -169,6 +169,19 @@ impl Ball { pub fn draw_boot(&self) { self.gfx.draw_boot_logo().ok(); } pub fn update(&mut self) { + /* // for testing fonts, etc. + use std::fmt::Write; + let mut tv = graphics_server::TextView::new( + graphics_server::Gid::new([0, 0, 0, 0]), + graphics_server::TextBounds::BoundingBox(self.clip), + ); + tv.clip_rect = Some(self.clip); + tv.set_dry_run(false); + tv.set_op(graphics_server::TextOp::Render); + tv.style = graphics_server::api::GlyphStyle::Tall; + write!(tv.text, "hello world! 😀").ok(); + self.gfx.draw_textview(&mut tv).ok(); + */ let mut draw_list = ClipObjectList::default(); // clear the previous location of the ball