Font

Inheritance: java.lang.Object

public final class Font

Class representing a font.

Constructors

Constructor Description
Font(String fontFamilyName, float size) Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified font family name and a size.
Font(String fontFamilyName, float size, int style) Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) 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)

Methods

Method Description
getFolderPath()
setFolderPath(String folderPath)
getFamilyName() Gets the family name of this [Font](../../com.groupdocs.watermark.watermarks/font).
getSize() Gets the size of this [Font](../../com.groupdocs.watermark.watermarks/font).
getStyle() Gets the [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) for this [Font](../../com.groupdocs.watermark.watermarks/font).
getBold() Gets a value indicating whether the font is bold.
getItalic() Gets a value indicating whether the font is italic.
getStrikeout() Gets a value indicating whether the font specifies a horizontal line through the font.
getUnderline() Gets a value indicating whether the font is underlined.

Font(String fontFamilyName, float size)

public Font(String fontFamilyName, float size)

Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified font family name and a size.

Parameters:

Parameter Type Description
fontFamilyName java.lang.String The font family name.
size float The size of the new font.

Font(String fontFamilyName, float size, int style)

public Font(String fontFamilyName, float size, int style)

Initializes a new instance of the [Font](../../com.groupdocs.watermark.watermarks/font) class with a specified font family name, a size and a style.

Parameters:

Parameter Type Description
fontFamilyName java.lang.String The font family name.
size float The size of the new font.
style int The [FontStyle](../../com.groupdocs.watermark.watermarks/fontstyle) of the new font.

Font(String fontFamilyName, String folderPath, float size)

public Font(String fontFamilyName, String folderPath, float size)

Parameters:

Parameter Type Description
fontFamilyName java.lang.String
folderPath java.lang.String
size float

Font(String fontFamilyName, String folderPath, float size, FontStyle style)

public Font(String fontFamilyName, String folderPath, float size, FontStyle style)

Parameters:

Parameter Type Description
fontFamilyName java.lang.String
folderPath java.lang.String
size float
style FontStyle

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.