for(int family=0; family < families.length; family++) { // for each family
for(int style = 0; style < styles.length; style++) { // for each style
Font f = new Font(families[family], styles[style], 16); // create font
String s = families[family] + " " + stylenames[style]; // create name
g.setFont(f); // set font
g.drawString(s, 10, (family*4 + style + 1) * 20); // display name
}
}