Java can't see all installed fonts in system

The JVM doesn't necessarily use the fonts installed on your System, It is being shipped with its own fonts with you can see at

JAVA_HOME/jre/lib/fonts

For you to use a font with the JVM you need create the fonts and add them to the directory above or add the directory of the new fonts to your class path.

Alternatively, you can package the fonts with your jar archive file, Download fonts here

http://cooltext.com/Fonts-Gothic

or the Microsoft true Type fonts.


One some Windows machines there are two buttons for installing fonts: Install For Me and Install For All Users. Java only lists fonts installed for all users.


can you try this?, and ensure that you are using the latest JDK 7

public static void main(String[] args) {        
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontFamilies = ge.getAvailableFontFamilyNames();
    for (String ff : fontFamilies) {
        System.out.println(ff);
    }
}

Tags:

Java

Fonts

Awt

Birt