import java.awt.*;
public class GetLocalFontFamily {
public static void main(String[] agrs) {
// 获取系统所有可用字体名称
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontName = e.getAvailableFontFamilyNames();
for (int i = 0; i < fontName.length; i++) {
System.out.println(fontName[i]);
}
}
}
转自 https://www.cnblogs.com/KeenLeung/archive/2012/05/25/2517361.html