Class FontSettings


  • public final class FontSettings
    extends Object

    Specifies font settings used when rendering project's view.

    • Constructor Detail

      • FontSettings

        public FontSettings()
    • Method Detail

      • getDefaultFontName

        public final String getDefaultFontName()

        Gets the default (or fallback) font for rendering.

        Returns:
        the default (or fallback) font for rendering.
      • setDefaultFontName

        public final void setDefaultFontName​(String value)

        Sets the default (or fallback) font for rendering.

        Parameters:
        value - the default (or fallback) font for rendering.
      • getFontResolveCallback

        public final FontResolveCallbackDelegate getFontResolveCallback()

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

        Returns:
        a callback which can be used to customize resolved fonts.
      • setFontResolveCallback

        public final void setFontResolveCallback​(FontResolveCallbackDelegate value)

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

        Parameters:
        value - 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:
        a value indicating whether the default font must be used for rendering.
      • setUseProjectDefaultFont

        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:
        value - a value indicating whether the default font must be used for rendering.
      • setFontFolders

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

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

        Parameters:
        fontFolders - An array of folders that contain TrueType fonts.
        recursive - If true the specified folders will be scanned recursively.