Re: Getting available fonts
You can see only the fonts known by the Java Runtime. In the help which comes with the JDK you find information how to add a new font to the Java Runtime.
Unfortunatelly, you should do it by hand, modifying the font.properties file.
Re: Getting available fonts
Hi.
Actually, it is possible.
What I did last winter (when doing a simple paint applet) was something like this:
FontX oFontX = new FontX();
String[] oFonts = oFontx.getFontList();
(you might have to import com.ms.awt.*)
This works for getting all the available font types (for example for loading into a combo box) but that doesn't change the fact that you can't use any TrueType fonts in the applet. At least I couldn't. Let me know if you find out.
Re: Getting available fonts
hi,
the piece of code which iam giving will fetch all possible fonts on ur system.Actually it filled out my entire dos window :).
this works with java 2 only.
create an array of Font,
u have to use awt package for this.
GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
fonts=ge.getAllFonts();