FontSettings

Inheritance: java.lang.Object

public final class FontSettings

Specifies font settings used when rendering project’s view.

Constructors

ConstructorDescription
FontSettings()

Methods

MethodDescription
getDefaultFontName()Gets the default (or fallback) font for rendering.
getFontResolveCallback()Gets a callback which can be used to customize resolved fonts.
getUseProjectDefaultFont()Gets a value indicating whether the default font must be used for rendering.
setDefaultFontName(String value)Sets the default (or fallback) font for rendering.
setFontFolders(String[] fontFolders, boolean recursive)Sets the folders where Aspose.Tasks looks for TrueType fonts when rendering project’s view.
setFontResolveCallback(FontResolveCallbackDelegate value)Sets a callback which can be used to customize resolved fonts.
setUseProjectDefaultFont(boolean value)Sets a value indicating whether the default font must be used for rendering.

FontSettings()

public FontSettings()

getDefaultFontName()

public final String getDefaultFontName()

Gets the default (or fallback) font for rendering.

Returns: java.lang.String - the default (or fallback) font for rendering.

getFontResolveCallback()

public final FontResolveCallbackDelegate getFontResolveCallback()

Gets a callback which can be used to customize resolved fonts.

Returns: FontResolveCallbackDelegate - a callback which can be used to customize resolved fonts.

getUseProjectDefaultFont()

public final boolean getUseProjectDefaultFont()

Gets a value indicating whether the default font must be used for rendering.


When the value is False and DefaultFontName is specified, the rendering engine will utilize the font specified by DefaultFontName as a fallback font. Otherwise ‘Arial’ (if installed) or ‘Generic Sans Serif’ fonts are used as a fallback font. The fallback font is utilized during the rendering of project view when a text style references a font that is not installed on the current operating system. For greater control over font resolution you can use FontResolveCallback(getFontResolveCallback/setFontResolveCallback(FontResolveCallbackDelegate)) callback.

Returns: boolean - a value indicating whether the default font must be used for rendering.

setDefaultFontName(String value)

public final void setDefaultFontName(String value)

Sets the default (or fallback) font for rendering.

Parameters:

ParameterTypeDescription
valuejava.lang.Stringthe default (or fallback) font for rendering.

setFontFolders(String[] fontFolders, boolean recursive)

public final void setFontFolders(String[] fontFolders, boolean recursive)

Sets the folders where Aspose.Tasks looks for TrueType fonts when rendering project’s view.

Parameters:

ParameterTypeDescription
fontFoldersjava.lang.String[]An array of folders that contain TrueType fonts.
recursivebooleanIf true the specified folders will be scanned recursively.

setFontResolveCallback(FontResolveCallbackDelegate value)

public final void setFontResolveCallback(FontResolveCallbackDelegate value)

Sets a callback which can be used to customize resolved fonts.

Parameters:

ParameterTypeDescription
valueFontResolveCallbackDelegatea callback which can be used to customize resolved fonts.

setUseProjectDefaultFont(boolean value)

public final void setUseProjectDefaultFont(boolean value)

Sets a value indicating whether the default font must be used for rendering.


When the value is False and DefaultFontName is specified, the rendering engine will utilize the font specified by DefaultFontName as a fallback font. Otherwise ‘Arial’ (if installed) or ‘Generic Sans Serif’ fonts are used as a fallback font. The fallback font is utilized during the rendering of project view when a text style references a font that is not installed on the current operating system. For greater control over font resolution you can use FontResolveCallback(getFontResolveCallback/setFontResolveCallback(FontResolveCallbackDelegate)) callback.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether the default font must be used for rendering.