my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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: 10171
    
    8

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: 10171
    
    8

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
System Tray
how to connect argox os 2140 to system and how set font and barcode link to system
Tips on using this discussion software
How do I include a custom font in a NetBean project?
Exception