views:

19

answers:

1

Right now I'm setting a font to my application, but I was just following an example. How can I know what fonts I have available to me?

FontFamily alphaSansFamily;
try {
    alphaSansFamily = FontFamily.forName("BBAlpha Serif");
    Font appFont = alphaSansFamily.getFont(Font.PLAIN, 9,
            Ui.UNITS_pt);
    setFont(appFont);
} catch (ClassNotFoundException e) {
    e.printStackTrace();
}

Thanks!

A: 

You can use FontFamily.getFontFamilies() to get a list of all fonts on the device.

Marc Novakowski