Last active
December 17, 2015 14:29
-
-
Save alea12/5624919 to your computer and use it in GitHub Desktop.
List available fonts of the environment using Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
public class AvailableFonts { | |
public static void main(String[] args) { | |
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); | |
Font[] avfonts = ge.getAllFonts(); | |
for (Font f : avfonts) { | |
System.out.println(f.getFontName()); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment