draw some stuff to the graphics context
String title;
int height = 0;
g.setColor(0x00000000);
g.fillRect(0, 0, myCanvas.getWidth(), myCanvas.getHeight());
g.setColor(0x00ffffff);
switch (currentFace) {
case Font.FACE_SYSTEM:
title = "System";
break;
case Font.FACE_PROPORTIONAL:
title = "Proportional";
break;
case Font.FACE_MONOSPACE:
title = "Monospaced";
break;
default:
title = "unknown";
break;
}
g.drawString(title, 0, 0, Graphics.TOP|Graphics.LEFT);
height += g.getFont().getHeight();
g.setFont(Font.getFont(currentFace,
Font.STYLE_PLAIN,
Font.SIZE_LARGE));
g.drawString("Regular plain", 0, height, Graphics.TOP|Graphics.LEFT);
height += g.getFont().getHeight();
g.setFont(Font.getFont(currentFace,
Font.STYLE_ITALIC,
Font.SIZE_LARGE));
g.drawString("Regular ital", 0, height, Graphics.TOP|Graphics.LEFT);
height += g.getFont().getHeight();
g.setFont(Font.getFont(currentFace,
Font.STYLE_BOLD,
Font.SIZE_LARGE));
g.drawString("Bold plain", 0, height, Graphics.TOP|Graphics.LEFT);
height += g.getFont().getHeight();
g.setFont(Font.getFont(currentFace,
Font.STYLE_BOLD|Font.STYLE_ITALIC,
Font.SIZE_LARGE));
g.drawString("Bold ital", 0, height, Graphics.TOP|Graphics.LEFT);