Created
April 12, 2018 16:00
-
-
Save sainnr/2c49269b086f1cd283dbcbf96053b99b to your computer and use it in GitHub Desktop.
Check local fonts with Java
This file contains hidden or 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.GraphicsEnvironment; | |
public class ListFonts { | |
public static void main(String args[]) { | |
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment(); | |
for(String font:e.getAvailableFontFamilyNames()) { | |
System.out.println(font); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment