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. |
Font(String fontFamilyName,
String folderPath,
float size) |
Font(String fontFamilyName,
String folderPath,
float size,
FontStyle 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
. |
String |
getFolderPath() |
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.
|
void |
setFolderPath(String folderPath) |
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 Font(String fontFamilyName, float size, int style)
Font class with a specified font family name, a size and a style.fontFamilyName - The font family name.size - The size of the new font.style - The FontStyle of the new font.public final boolean getBold()
Gets a value indicating whether the font is bold.
public final String getFamilyName()
Font.Font.public String getFolderPath()
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.
public void setFolderPath(String folderPath)
Copyright © 2026. All rights reserved.