Skip to content

Instantly share code, notes, and snippets.

@manuelbua
Created February 4, 2014 10:49
Show Gist options
  • Save manuelbua/8801534 to your computer and use it in GitHub Desktop.
Save manuelbua/8801534 to your computer and use it in GitHub Desktop.
import java.awt.GraphicsEnvironment;
public class ListJavaFonts
{
public static void main(String[] args)
{
String fonts[] =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for ( int i = 0; i < fonts.length; i++ )
{
System.out.println(fonts[i]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment