Convert the value of the given
Attribute
object into an output object of the
specified type.
Returns the
Font
that the
str
argument describes.
To ensure that this method returns the desired Font,
format the
str
parameter in
one of two ways:
"fontfamilyname-style-pointsize" or
"fontfamilyname style pointsize"
in which
style is one of the three
case-insensitive strings:
"BOLD"
,
"BOLDITALIC"
, or
"ITALIC"
, and pointsize is a decimal
representation of the point size.
For example, if you want a font that is Arial, bold, and
a point size of 18, you would call this method with:
"Arial-BOLD-18".
The default size is 12 and the default style is PLAIN.
If you don't specify a valid size, the returned
Font
has a size of 12. If you don't specify
a valid style, the returned Font has a style of PLAIN.
If you do not provide a valid font family name in
the
str
argument, this method still returns
a valid font with a family name of "dialog".
To determine what font family names are available on
your system, use the
GraphicsEnvironment.getAvailableFontFamilyNames()
method.
If
str
is
null
, a new
Font
is returned with the family name "dialog", a size of 12 and a
PLAIN style.
If
str
is
null
,
a new
Font
is returned with the name "dialog", a
size of 12 and a PLAIN style.