Java : Getting a list of all system fonts

Created 07 June 2002 00:00
  GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment();
  String fonts[] = g.getAvailableFontFamilyNames();
  for (int i=0; i < fonts.length; i++) {
    System.out.println(fonts[i]);
  }