import java.io.IOException;

import jcontrol.io.Display;
import jcontrol.io.Resource;

/**
 * This example loads a font from the flash memory and 
 * uses it to draw some text onto the screen.
 */
public class FontExample {
  Display lcd;
  
  public FontExample() {
    lcd = new Display();
    
    try {
      // switch to arial 30 point font
      lcd.setFont(new Resource("arial30.jcfd"));
      lcd.drawString("That's big!", 0, 10);
    } catch (IOException e) {}    
      
    // switch back to system font
    lcd.setFont(Display.SYSTEMFONT);
    lcd.drawString("Switched back to system font", 0, 50);
    
    for (;;) {} // sleep well
  }

  public static void main(String[] args) {
    new FontExample();
  }
}
