font/font.rs
1/*!
2 * This example shows off some of the font-rendering capabilities of the library.
3 */
4
5extern crate simple;
6use simple::*;
7
8fn main() {
9 let mut app = Window::new("Image Font Demo", 640, 480);
10 while app.next_frame() {
11 app.clear_to_color(32, 64, 32);
12
13 app.set_color(255, 255, 255, 255);
14 app.print("Hello world!", 32, 32);
15 app.print("This example demonstrates ImageFont rendering :)", 32, 64);
16 app.print("You can even write symbols: !@#$%^&*()", 32, 96);
17
18 app.set_color(0, 255, 255, 255);
19 app.print("16777216 possible rendering colors!", 32, 128);
20 }
21}