aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to get system font? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to get system font?" Watch "how to get system font?" New topic
Author

how to get system font?

Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

how to obtain native system font ??
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9993
    
    7

GraphicsEnvironment#getAllFonts
GraphicsEnvironment#getAvailableFontFamilyNames


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

Yes,
but how to know the present system font in use?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9993
    
    7

That would depend on the LAF and the component being used.
You can retrieve it using UIManager.get("Label.font");
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

thank you,
from a existing component, i get system font by getFont() with out assigning a custom font to that component.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get system font?
 
Similar Threads
how to connect argox os 2140 to system and how set font and barcode link to system
Tips on using this discussion software
Exception
System Tray
How do I include a custom font in a NetBean project?