Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified custom font family name, folder path with a font and a size.
Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified custom font family name, folder path with a font, a size and a style.
public Font(String fontFamilyName, String folderPath, float size)
Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified custom font family name, folder path with a font and a size.
Parameters:
Parameter
Type
Description
fontFamilyName
java.lang.String
The font family name.
folderPath
java.lang.String
Folder path which contains TrueType font files.
size
float
The size of the new font.
Font(String fontFamilyName, String folderPath, float size, int style)
public Font(String fontFamilyName, String folderPath, float size, int style)
Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified custom font family name, folder path with a font, a size and a style.
Parameters:
Parameter
Type
Description
fontFamilyName
java.lang.String
The font family name.
folderPath
java.lang.String
Folder path which contains TrueType font files.
size
float
The size of the new font.
style
int
The [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) of the new font, a combination of the [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) constants.
getFolderPath()
public String getFolderPath()
Returns:
java.lang.String
setFolderPath(String folderPath)
public void setFolderPath(String folderPath)
Parameters:
Parameter
Type
Description
folderPath
java.lang.String
getFamilyName()
public final String getFamilyName()
Gets the family name of this [Font](../../com.groupdocs.watermark.watermarks/font).
Returns:
java.lang.String - The family name of this [Font](../../com.groupdocs.watermark.watermarks/font).
getSize()
public final float getSize()
Gets the size of this [Font](../../com.groupdocs.watermark.watermarks/font).
Returns:
float - The size of this [Font](../../com.groupdocs.watermark.watermarks/font).
getStyle()
public final int getStyle()
Gets the [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) for this [Font](../../com.groupdocs.watermark.watermarks/font).
Default value is [FontStyle.Regular](../../com.groupdocs.watermark.watermarks/fontstyle#Regular) (normal text).
Returns:
int - The [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) of this [Font](../../com.groupdocs.watermark.watermarks/font).
getBold()
public final boolean getBold()
Gets a value indicating whether the font is bold.
Returns:
boolean - True if this font is bold; otherwise, false.
getItalic()
public final boolean getItalic()
Gets a value indicating whether the font is italic.
Returns:
boolean - True if this font is italic; otherwise, false.
getStrikeout()
public final boolean getStrikeout()
Gets a value indicating whether the font specifies a horizontal line through the font.
Returns:
boolean - True if this font specifies a horizontal line through the font; otherwise, false.
getUnderline()
public final boolean getUnderline()
Gets a value indicating whether the font is underlined.
Returns:
boolean - True if this font is underlined; otherwise, false.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.