Hi
I have read: http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Font.html
"
Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries. Instead, the logical font names are mapped to physical fonts by the Java runtime environment. The mapping is implementation and usually locale dependent, so the look and the metrics provided by them vary. Typically, each logical font name maps to several physical fonts in order to cover a large range of characters.
"
I can obtain all the fonts that are in a particular system, but now need to go though them to see if they are Monospaced.
This is what I have done so far:
String[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
ArrayList<String> monoFonts = new ArrayList();
for(int i=0;i<allFonts.length; i++)
{
if (f.getFamily().toString().equals("Monospaced"))
{
monoFonts.add(allFonts);
}
}
Thanks!
Sam