File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes What are all the typefaces available? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What are all the typefaces available?" Watch "What are all the typefaces available?" New topic

What are all the typefaces available?

Thomas Knight
Ranch Hand

Joined: Feb 08, 2003
Posts: 33
What I am doing:
Font f = new Font(typeface, style, size);

My Problem:
I am having a hard time finding all the type faces that Java will understand(ex: Serif, Helvetica ?). I only know a couple. Where do I find this information? All I need is a list of 7-10 typeface names if anybody knows them. Thanks.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Thomas,
Here is an excerpt from the API docs on Font:
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.
Here is a simple app to list all font families on a particular system:

Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Thomas Knight
Ranch Hand

Joined: Feb 08, 2003
Posts: 33
Thanks for the reply Michael. I had read something about the Graphics Environment thing. I forgot that I would need to check each persons system to see the kinds of fonts available. I think for my purposes I will use the font families that are supported on all Machines.
subject: What are all the typefaces available?
Similar Threads
string contains a TAB will not be recognized in drawString(String str,int x, int y) method
What type are you?
Print on client machine
Which superhero are you?
inner class