Hi,
I use this piece of code to replace the font in a table header:
UIDefaults def = UIManager.getDefaults();
myDefaultFont = (Font)def.get("TableHeader.font");
myDefaultFont = new Font("Verdana", defaultFont.getStyle(), 11);
Is there a way to check out if the font "Verdana" really exists?
Background: if I use this and the font doesn't exist the Font class will
fall back on a default font, but in that case I would like to try "Arial"
first, then "Helvetica" and if all of these fonts don't work I want Java to
use the standard font.
Thanks.
cu
Rene
Thomas Weidenfeller - 09 Dec 2003 13:30 GMT
> Is there a way to check out if the font "Verdana" really exists?
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()
/Thomas
Rene Ruppert - 10 Dec 2003 13:11 GMT