public final class Font extends Object
Class representing a font.
Constructor and Description |
---|
Font(String fontFamilyName,
float size)
Initializes a new instance of the
class with a specified font family name and a size. |
Font(String fontFamilyName,
float size,
int style)
Initializes a new instance of the
class with a specified font family name, a size and a style. |
Modifier and Type | Method and Description |
---|---|
boolean |
getBold()
Gets a value indicating whether the font is bold.
|
String |
getFamilyName()
Gets the family name of this
. |
boolean |
getItalic()
Gets a value indicating whether the font is italic.
|
float |
getSize()
Gets the size of this
. |
boolean |
getStrikeout()
Gets a value indicating whether the font specifies a horizontal line through the font.
|
int |
getStyle()
|
boolean |
getUnderline()
Gets a value indicating whether the font is underlined.
|
public Font(String fontFamilyName, float size)
Font
class with a specified font family name and a size.fontFamilyName
- The font family name.size
- The size of the new font.public final String getFamilyName()
Font
.Font
.public final boolean getBold()
Gets a value indicating whether the font is bold.
public final boolean getItalic()
Gets a value indicating whether the font is italic.
public final boolean getStrikeout()
Gets a value indicating whether the font specifies a horizontal line through the font.
public final boolean getUnderline()
Gets a value indicating whether the font is underlined.